> William Orr <mailto:w...@worrbase.com>
> August 20, 2013 7:40 PM
> Bump
>
>
Theo pointed out that it would be better to change whitecount to an int,
so as to match the call to configure_pf().

Since trapcount is logically similar, and uses the same iterator
variable in freeaddrlists(), I changed that to an int as well. This
still includes the sscanf time_t fix.

Ok ?

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    21 Aug 2013 03:31:03 -0000
@@ -61,8 +61,8 @@ int server_lookup4(struct sockaddr_in *,
 int server_lookup6(struct sockaddr_in6 *, struct sockaddr_in6 *,
     struct sockaddr_in6 *);
 
-size_t whitecount, whitealloc;
-size_t trapcount, trapalloc;
+int whitecount, whitealloc;
+int trapcount, trapalloc;
 char **whitelist;
 char **traplist;
 
@@ -122,9 +122,9 @@ sig_term_chld(int sig)
  * host hits.
  */
 void
-configure_spamd(char **addrs, size_t count, FILE *sdc)
+configure_spamd(char **addrs, int count, FILE *sdc)
 {
-    size_t i;
+    int i;
 
     fprintf(sdc, "%s;", traplist_name);
     if (count != 0) {
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    21 Aug 2013 03:31:03 -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;
@@ -1114,7 +1114,7 @@ main(int argc, char *argv[])
             greylist = 0;
             break;
         case 'G':
-            if (sscanf(optarg, "%d:%d:%d", &passtime, &greyexp,
+            if (sscanf(optarg, "%lld:%lld:%lld", &passtime, &greyexp,
                 &whiteexp) != 3)
                 usage();
             /* convert to seconds from minutes */

Reply via email to