Loop variables are declared as ints when they're compared to size_ts. This only becomes an issue when the config file or the output buffer becomes unreasonably large.

Index: libexec/spamd/grey.c
===================================================================
RCS file: /cvs/src/libexec/spamd/grey.c,v
retrieving revision 1.52
diff -u -b -w -p -r1.52 grey.c
--- libexec/spamd/grey.c    2 Oct 2012 15:26:17 -0000    1.52
+++ libexec/spamd/grey.c    17 Aug 2013 22:36:43 -0000
@@ -362,7 +362,7 @@ bad:
 void
 freeaddrlists(void)
 {
-    int i;
+    size_t i;

     if (whitelist != NULL)
         for (i = 0; i < whitecount; i++) {
Index: libexec/spamd/spamd.c
===================================================================
RCS file: /cvs/src/libexec/spamd/spamd.c,v
retrieving revision 1.112
diff -u -b -w -p -r1.112 spamd.c
--- libexec/spamd/spamd.c    19 Jun 2012 17:43:40 -0000    1.112
+++ libexec/spamd/spamd.c    17 Aug 2013 22:36:43 -0000
@@ -265,7 +265,7 @@ void
 parse_configs(void)
 {
     char *start, *end;
-    int i;
+    size_t i;

     if (cbu == cbs) {
         char *tmp;
@@ -371,7 +371,7 @@ append_error_string(struct con *cp, size
     char *c = cp->obuf + off;
     char *s = fmt;
     size_t len = cp->osize - off;
-    int i = 0;
+    size_t i = 0;

     if (off == 0)
         lastcont = 0;

Reply via email to