From d5a01cb8b31bd0791d1617c56d4c669a02018bd7 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 25 Dec 2009 16:14:22 +0100 Subject: [PATCH] udevadm: logging - copy va_list and do not use it twice --- udev/udevadm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udev/udevadm.c b/udev/udevadm.c index 00c2350d..21b7f616 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -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); } } -- 2.39.5