diff options
-rw-r--r-- | usr.bin/pr/pr.c | 5 | ||||
-rw-r--r-- | usr.bin/sup/src/supmsg.c | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index 9dcb580f320..bdcaf219d91 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pr.c,v 1.13 2001/11/19 19:02:15 mpech Exp $ */ +/* $OpenBSD: pr.c,v 1.14 2001/11/29 18:21:23 mpech Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$OpenBSD: pr.c,v 1.13 2001/11/19 19:02:15 mpech Exp $"; +static char *rcsid = "$OpenBSD: pr.c,v 1.14 2001/11/29 18:21:23 mpech Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -872,6 +872,7 @@ ferrout(char *fmt, ...) ferrtail = f; sigprocmask(SIG_SETMASK, &oblock, NULL); } + va_end(ap); } /* diff --git a/usr.bin/sup/src/supmsg.c b/usr.bin/sup/src/supmsg.c index 51d9ee37be3..edd636184c8 100644 --- a/usr.bin/sup/src/supmsg.c +++ b/usr.bin/sup/src/supmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: supmsg.c,v 1.7 2001/05/04 22:16:17 millert Exp $ */ +/* $OpenBSD: supmsg.c,v 1.8 2001/11/29 18:21:23 mpech Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -599,7 +599,7 @@ va_dcl x = writestring(NULL); if (x == SCMOK) x = writemend(); - return (x); + goto done; } if (x == SCMOK) x = writestring(t->Tname); @@ -608,7 +608,7 @@ va_dcl if (t->Tmode == 0) { if (x == SCMOK) x = writemend(); - return (x); + goto done; } if (x == SCMOK) x = writeint(t->Tflags); @@ -633,8 +633,10 @@ va_dcl } else { char *linkname, *execcmd; - if (t == NULL) - return (SCMERR); + if (t == NULL) { + x = SCMERR; + goto done; + } x = readmsg (MSGRECV); if (x == SCMOK) x = readstring(&t->Tname); @@ -642,7 +644,7 @@ va_dcl x = readmend(); if (x == SCMOK) x = (*xferfile)(NULL, args); - return (x); + goto done; } if (x == SCMOK) x = readint(&t->Tmode); @@ -650,7 +652,7 @@ va_dcl x = readmend(); if (x == SCMOK) x = (*xferfile)(t, args); - return (x); + goto done; } if (x == SCMOK) x = readint(&t->Tflags); @@ -685,6 +687,8 @@ va_dcl if (x == SCMOK) x = readmend(); } + +done: va_end(args); return (x); } |