summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/spamd/grey.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index 29a476f8349..e30333a288a 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.39 2007/03/18 18:38:57 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.40 2007/08/16 04:42:16 ray Exp $ */
/*
* Copyright (c) 2004-2006 Bob Beck. All rights reserved.
@@ -121,18 +121,19 @@ sig_term_chld(int sig)
* to collapse cidr ranges since these are only ever single
* host hits.
*/
-int
-configure_spamd(char **addrs, int count, FILE *sdc)
+void
+configure_spamd(char **addrs, size_t count, FILE *sdc)
{
- int i;
+ size_t i;
+ if (count == 0)
+ return;
fprintf(sdc, "%s;%s;", traplist_name, traplist_msg);
for (i = 0; i < count; i++)
fprintf(sdc, "%s/32;", addrs[i]);
fprintf(sdc, "\n");
if (fflush(sdc) == EOF)
syslog_r(LOG_DEBUG, &sdata, "configure_spamd: fflush failed (%m)");
- return(0);
}
@@ -628,8 +629,7 @@ greyscan(char *dbname)
db->close(db);
db = NULL;
configure_pf(whitelist, whitecount);
- if (configure_spamd(traplist, trapcount, trapcfg) == -1)
- syslog_r(LOG_DEBUG, &sdata, "configure_spamd failed");
+ configure_spamd(traplist, trapcount, trapcfg);
freeaddrlists();
free(a);