From 06896aaacd3fff0717425acf8234b863cf268883 Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 13 Jan 2015 21:45:53 +0000 Subject: [PATCH] Fix printing of number of whitelist entries in debug mode. --- libexec/spamd-setup/spamd-setup.c | 11 +++++++---- 1 file 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); } -- 2.20.1