summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-01-13 21:45:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-01-13 21:45:54 +0000
commit872acca12b26e7e3df114d064c58e76cdd8081a2 (patch)
tree5af995747dd758b911579e80b245e3cdb14ee20e /libexec
parent6316c576aca1a4eb935c79482402d343cc5ca931 (diff)
Fix printing of number of whitelist entries in debug mode.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/spamd-setup/spamd-setup.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libexec/spamd-setup/spamd-setup.c b/libexec/spamd-setup/spamd-setup.c
index e14d60f71b6..b1e28d08e88 100644
--- a/libexec/spamd-setup/spamd-setup.c
+++ b/libexec/spamd-setup/spamd-setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd-setup.c,v 1.40 2015/01/13 21:42:59 millert Exp $ */
+/* $OpenBSD: spamd-setup.c,v 1.41 2015/01/13 21:45:53 millert Exp $ */
/*
* Copyright (c) 2003 Bob Beck. All rights reserved.
@@ -737,6 +737,9 @@ getlist(char ** db_array, char *name, struct blacklist *blist,
return (0);
}
if (black) {
+ if (debug)
+ fprintf(stderr, "blacklist %s %zu entries\n",
+ name, blc / 2);
blistnew->message = message;
blistnew->name = name;
blistnew->black = black;
@@ -745,13 +748,13 @@ getlist(char ** db_array, char *name, struct blacklist *blist,
blistnew->bls = bls;
} else {
/* whitelist applied to last active blacklist */
+ if (debug)
+ fprintf(stderr, "whitelist %s %zu entries\n",
+ name, (blc - blist->blc) / 2);
blist->bl = bl;
blist->blc = blc;
blist->bls = bls;
}
- if (debug)
- fprintf(stderr, "%slist %s %zu entries\n",
- black ? "black" : "white", name, blc / 2);
return (black);
}