Small change in cfgwriter
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Mar 2010 07:56:31 +0000 (08:56 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Mar 2010 07:56:31 +0000 (08:56 +0100)
src/cfgparser/cfgfile_gen.c

index 3656ce3..2f0e14c 100644 (file)
@@ -84,11 +84,13 @@ if_appendf(struct autobuf *autobuf, bool comments, const char *fmt, ...)
   va_list ap;
   char *first;
 
-  va_start(ap, fmt);
-  first = va_arg(ap, char*);
-  va_end(ap);
-  if (!comments && *first) {
-    return 0;
+  if (!comments) {
+    va_start(ap, fmt);
+    first = va_arg(ap, char*);
+    va_end(ap);
+    if (*first) {
+      return 0;
+    }
   }
 
   va_start(ap, fmt);