You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-analyzer/nsat/files/nsat-1.5-va_list.patch

28 lines
470 B

--- a/src/Logging.cpp
+++ b/src/Logging.cpp
@@ -89,16 +89,17 @@
if((pi.Foreground) && (out!=NULL))
fprintf(stdout, "%s %s ", out, hn);
- va_start(va, fmt);
-
- if(fp!=NULL)
+ if(fp!=NULL) {
+ va_start(va, fmt);
vfprintf(fp, fmt, va);
+ va_end(va);
+ }
- if((pi.Foreground) && (out!=NULL))
+ if((pi.Foreground) && (out!=NULL)) {
+ va_start(va, fmt);
vfprintf(stdout, fmt, va);
-
- va_end(va);
-
+ va_end(va);
+ }
if(fp!=NULL)
fprintf(fp, "\n");