chiark / gitweb /
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 00c2350..21b7f61 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);
        }
 }