Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha PR port-alpha/50667: add missing va_sta...



details:   https://anonhg.NetBSD.org/src/rev/920b791181d8
branches:  trunk
changeset: 813129:920b791181d8
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jan 17 10:44:57 2016 +0000

description:
PR port-alpha/50667: add missing va_start/va_end.

diffstat:

 sys/arch/alpha/alpha/interrupt.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 2e5982b071ad -r 920b791181d8 sys/arch/alpha/alpha/interrupt.c
--- a/sys/arch/alpha/alpha/interrupt.c  Sun Jan 17 08:05:20 2016 +0000
+++ b/sys/arch/alpha/alpha/interrupt.c  Sun Jan 17 10:44:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.80 2012/02/06 02:14:11 matt Exp $ */
+/* $NetBSD: interrupt.c,v 1.81 2016/01/17 10:44:57 martin Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.80 2012/02/06 02:14:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.81 2016/01/17 10:44:57 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -518,8 +518,12 @@
        va_list ap;
        static const struct timeval msgperiod[1] = {{ 5, 0 }};
 
-       if (ratecheck(t, msgperiod))
-               vprintf(fmt, ap);
+       if (!ratecheck(t, msgperiod))
+               return;
+
+       va_start(ap, fmt);
+       vprintf(fmt, ap);
+       va_end(ap);
 }
 
 const static uint8_t ipl2psl_table[] = {



Home | Main Index | Thread Index | Old Index