bmf

bmf (Bayesian Mail Filter) 0.9.4 fork + patches
git clone git://git.codemadness.org/bmf
Log | Files | Refs | README | LICENSE

commit 8c2b855490c62d2b8f20a0dcbb85ed1dc7686155
parent 1e2885e37b75f738445d13b6a61caf9786b28fea
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 29 Sep 2018 12:49:39 +0200

dbg: simplify verbose function

Diffstat:
dbg.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/dbg.c b/dbg.c @@ -18,16 +18,11 @@ uint g_verbose = 0; void verbose(int level, const char *fmt,...) { - if (g_verbose >= level) { - char str[4096]; - va_list v; + va_list v; + if (g_verbose >= level) { va_start(v, fmt); - vsnprintf(str, sizeof(str) - 1, fmt, v); - str[sizeof(str) - 1] = '\0'; - - fputs(str, stderr); - + vfprintf(stderr, fmt, v); va_end(v); } }