Introduction
Introduction Statistics Contact Development Disclaimer Help
dbg: simplify verbose function - bmf - bmf (Bayesian Mail Filter) 0.9.4 fork + …
git clone git://git.codemadness.org/bmf
Log
Files
Refs
README
LICENSE
---
commit 8c2b855490c62d2b8f20a0dcbb85ed1dc7686155
parent 1e2885e37b75f738445d13b6a61caf9786b28fea
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 29 Sep 2018 12:49:39 +0200
dbg: simplify verbose function
Diffstat:
M 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);
}
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.