diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-05-26 02:25:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-05-26 02:25:13 +0000 |
commit | 347e7a0052fe0610ec105de34efe935c727fd3ce (patch) | |
tree | 53fd93c58d394cdf6782babb1b96014b926a8509 /epan/dissectors | |
parent | 7da29cfe69d37b0e601d13546fd667739f581dbe (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 'epan/dissectors')
-rw-r--r-- | epan/dissectors/dcerpc/idl2wrs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dissectors/dcerpc/idl2wrs.c b/epan/dissectors/dcerpc/idl2wrs.c index bccef64a0a..2eba2b2e32 100644 --- a/epan/dissectors/dcerpc/idl2wrs.c +++ b/epan/dissectors/dcerpc/idl2wrs.c @@ -105,13 +105,17 @@ static char line[1024]; static void FPRINTF(FILE *fh, const char *format, ...) { va_list args; - va_start(args, format); + #ifdef IDL2WRS_DEBUG + va_start(args, format); vfprintf (stderr, format, args); + va_end(args); #endif - if (fh) + if (fh) { + va_start(args, format); vfprintf (fh, format, args); - va_end(args); + va_end(args); + } } typedef struct _pointer_item_t { |