diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-13 08:52:46 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-13 08:52:46 +0000 |
commit | 52d9206619e04e5dca7ada0618e60fea74dd0467 (patch) | |
tree | 849a7b90b1f36ee4e8df4f9bff1c2dfbb894342c /bin | |
parent | 5fcf0e87bd7fdd61b838af3ddda2b5d294a5a567 (diff) |
va_start/end for every call to vfprintf and friends, from scp.c
Diffstat (limited to 'bin')
-rw-r--r-- | bin/rcp/rcp.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index 2c1fd243c86..b776f8df6a8 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcp.c,v 1.20 2001/05/11 18:43:40 mickey Exp $ */ +/* $OpenBSD: rcp.c,v 1.21 2001/06/13 08:52:42 markus Exp $ */ /* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */ /* @@ -906,23 +906,29 @@ run_err(fmt, va_alist) { static FILE *fp; va_list ap; -#ifdef __STDC__ - va_start(ap, fmt); -#else - va_start(ap); -#endif ++errs; if (fp == NULL && !(fp = fdopen(rem, "w"))) return; (void)fprintf(fp, "%c", 0x01); (void)fprintf(fp, "rcp: "); +#ifdef __STDC__ + va_start(ap, fmt); +#else + va_start(ap); +#endif (void)vfprintf(fp, fmt, ap); + va_end(ap); (void)fprintf(fp, "\n"); (void)fflush(fp); - if (!iamremote) + if (!iamremote) { +#ifdef __STDC__ + va_start(ap, fmt); +#else + va_start(ap); +#endif vwarnx(fmt, ap); - - va_end(ap); + va_end(ap); + } } |