From e8b0d0114c17881aded1035d7dd8137501bacb70 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Thu, 3 Jan 2002 19:28:38 +0000 Subject: Proper va_end calling (no double calls) --- sys/arch/macppc/macppc/opendev.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sys/arch/macppc') diff --git a/sys/arch/macppc/macppc/opendev.c b/sys/arch/macppc/macppc/opendev.c index 431d82ed98b..95d7f83fddb 100644 --- a/sys/arch/macppc/macppc/opendev.c +++ b/sys/arch/macppc/macppc/opendev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opendev.c,v 1.2 2001/09/05 22:32:38 deraadt Exp $ */ +/* $OpenBSD: opendev.c,v 1.3 2002/01/03 19:28:37 jason Exp $ */ /* $NetBSD: openfirm.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -185,14 +185,10 @@ OF_call_method_1(method, ihandle, nargs, va_alist) *--ip = va_arg(ap, int); va_end(ap); ofw_stack(); - if (openfirmware(&args) == -1) { - va_end(ap); + if (openfirmware(&args) == -1) return -1; - } - if (args.args_n_results[nargs]) { - va_end(ap); + if (args.args_n_results[nargs]) return -1; - } return args.args_n_results[nargs + 1]; } -- cgit v1.2.3