aboutsummaryrefslogtreecommitdiffstats
path: root/trigcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-26 02:25:13 +0000
committerGuy Harris <guy@alum.mit.edu>2010-05-26 02:25:13 +0000
commit347e7a0052fe0610ec105de34efe935c727fd3ce (patch)
tree53fd93c58d394cdf6782babb1b96014b926a8509 /trigcap.c
parent7da29cfe69d37b0e601d13546fd667739f581dbe (diff)
More <stdarg.h> cleanup; some are real bugs, some are just "don't do
va_start and va_end unless you're actually going to use the va_list" (those bring the va_start and va_end closer to the use point, which makes it a little more obvious that we're using <stdarg.h> correctly and makes it a little harder to use it incorrectly). svn path=/trunk/; revision=32963
Diffstat (limited to 'trigcap.c')
-rw-r--r--trigcap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trigcap.c b/trigcap.c
index 9ecce1f8cc..394c50ad21 100644
--- a/trigcap.c
+++ b/trigcap.c
@@ -49,12 +49,12 @@ static void panic(int err, const char* fmt, ...) {
static void dprintf(int lev, const char* fmt, ...) {
va_list ap;
- va_start(ap,fmt);
if (lev <= debug_level) {
+ va_start(ap,fmt);
vfprintf(stderr,fmt,ap);
+ va_end(ap);
fflush(stderr);
}
- va_end(ap);
}