]> err.no Git - systemd/commitdiff
udevadm: logging - copy va_list and do not use it twice
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 25 Dec 2009 15:14:22 +0000 (16:14 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 25 Dec 2009 15:14:22 +0000 (16:14 +0100)
udev/udevadm.c

index 00c2350d356717812034cb5cef1be673cea1ff3e..21b7f616c3e11c04995841ead06e0d3a59efad29 100644 (file)
@@ -35,7 +35,11 @@ static void log_fn(struct udev *udev, int priority,
                fprintf(stderr, "%s: ", fn);
                vfprintf(stderr, format, args);
        } else {
-               vfprintf(stderr, format, args);
+               va_list args2;
+
+               va_copy(args2, args);
+               vfprintf(stderr, format, args2);
+               va_end(args2);
                vsyslog(priority, format, args);
        }
 }