aboutsummaryrefslogtreecommitdiffstats
path: root/trigcap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-26 02:25:13 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-26 02:25:13 +0000
commitc053fa94ab082986dade8fe214e4964986193f85 (patch)
tree53fd93c58d394cdf6782babb1b96014b926a8509 /trigcap.c
parentd65445deecae59393ab3aaf75639d798c8a38104 (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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32963 f5534014-38df-0310-8fa8-9805f1628bb7
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);
}