From: miod Date: Sun, 14 Jun 2015 10:55:50 +0000 (+0000) Subject: Fix 1.26; kdoprnt() should not attempt to invoke va_end() at all, it's the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7f5d5ca958230f1b232f4875ecf663646a75bf45;p=openbsd Fix 1.26; kdoprnt() should not attempt to invoke va_end() at all, it's the caller's responsibility to do so. --- diff --git a/sys/lib/libsa/printf.c b/sys/lib/libsa/printf.c index bf8edd9306d..0b3b5402a55 100644 --- a/sys/lib/libsa/printf.c +++ b/sys/lib/libsa/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.26 2015/03/10 21:07:24 miod Exp $ */ +/* $OpenBSD: printf.c,v 1.27 2015/06/14 10:55:50 miod Exp $ */ /* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */ /*- @@ -96,10 +96,8 @@ kdoprnt(void (*put)(int), const char *fmt, va_list ap) for (;;) { while ((ch = *fmt++) != '%') { - if (ch == '\0') { - va_end(ap); + if (ch == '\0') return; - } put(ch); } lflag = 0;