diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-06 11:14:21 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-06 11:14:21 +0000 |
| commit | 76900889fa050563a1629692c6ced9033cdf71dd (patch) | |
| tree | fbde434297a039063e83973159cfcf63fb88f1bd /bin | |
| parent | d9e5246b17769adb460515d3ac43c07f6996772c (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/rcp/rcp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index d86fec0fe6c6..8ea6be5c9ee1 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -926,19 +926,23 @@ run_err(const char *fmt, ...) { static FILE *fp; va_list ap; - va_start(ap, fmt); ++errs; if (fp == NULL && !(fp = fdopen(rem, "w"))) return; (void)fprintf(fp, "%c", 0x01); (void)fprintf(fp, "rcp: "); + va_start(ap, fmt); (void)vfprintf(fp, fmt, ap); + va_end(ap); (void)fprintf(fp, "\n"); (void)fflush(fp); - if (!iamremote) + if (!iamremote) { + va_start(ap, fmt); vwarnx(fmt, ap); + va_end(ap); + } va_end(ap); } |
