Ooops
[privoxy.git] / filters.c
index aa798bc..9ba1605 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.31 2001/09/16 11:38:02 jongfoster Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.33 2001/09/16 17:05:14 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -38,6 +38,12 @@ const char filters_rcs[] = "$Id: filters.c,v 1.31 2001/09/16 11:38:02 jongfoster
  *
  * Revisions   :
  *    $Log: filters.c,v $
+ *    Revision 1.33  2001/09/16 17:05:14  jongfoster
+ *    Removing unused #include showarg.h
+ *
+ *    Revision 1.32  2001/09/16 13:21:27  jongfoster
+ *    Changes to use new list functions.
+ *
  *    Revision 1.31  2001/09/16 11:38:02  jongfoster
  *    Splitting fill_template() into 2 functions:
  *    template_load() loads the file
@@ -291,12 +297,8 @@ const char filters_rcs[] = "$Id: filters.c,v 1.31 2001/09/16 11:38:02 jongfoster
 #include "project.h"
 #include "filters.h"
 #include "encode.h"
-#include "jcc.h"
-#include "showargs.h"
 #include "parsers.h"
 #include "ssplit.h"
-#include "gateway.h"
-#include "jbsockets.h"
 #include "errlog.h"
 #include "jbsockets.h"
 #include "miscutil.h"
@@ -963,7 +965,7 @@ int is_untrusted_url(struct client_state *csp)
 char *pcrs_filter_response(struct client_state *csp)
 {
    int hits=0;
-   int size = csp->iob->eod - csp->iob->cur;
+   size_t size;
 
    char *old = csp->iob->cur, *new = NULL;
    pcrs_job *job;
@@ -972,10 +974,11 @@ char *pcrs_filter_response(struct client_state *csp)
    struct re_filterfile_spec *b;
 
    /* Sanity first ;-) */
-   if (size <= 0)
+   if (csp->iob->cur >= csp->iob->eod)
    {
       return(NULL);
    }
+   size = csp->iob->eod - csp->iob->cur;
 
    if ( ( NULL == (fl = csp->rlist) ) || ( NULL == (b = fl->f) ) )
    {