summaryrefslogtreecommitdiffstats
path: root/scp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 13:49:43 +1100
committerDamien Miller <djm@mindrot.org>2006-03-26 13:49:43 +1100
commit745570cd7991f2a47649b414084496128326f5d3 (patch)
tree9805252b7c76cc98127a5482404c735dba17e22f /scp.c
parentcb314828eb11b3827a096d9b4abcd8d229764a46 (diff)
- biorn@cvs.openbsd.org 2006/03/16 10:31:45
[scp.c] Try to display errormessage even if remout == -1 ok djm@, markus@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/scp.c b/scp.c
index 43fd50c9..bf9db97c 100644
--- a/scp.c
+++ b/scp.c
@@ -1106,15 +1106,15 @@ run_err(const char *fmt,...)
va_list ap;
++errs;
- if (fp == NULL && !(fp = fdopen(remout, "w")))
- return;
- (void) fprintf(fp, "%c", 0x01);
- (void) fprintf(fp, "scp: ");
- va_start(ap, fmt);
- (void) vfprintf(fp, fmt, ap);
- va_end(ap);
- (void) fprintf(fp, "\n");
- (void) fflush(fp);
+ if (fp != NULL || (remout != -1 && (fp = fdopen(remout, "w")))) {
+ (void) fprintf(fp, "%c", 0x01);
+ (void) fprintf(fp, "scp: ");
+ va_start(ap, fmt);
+ (void) vfprintf(fp, fmt, ap);
+ va_end(ap);
+ (void) fprintf(fp, "\n");
+ (void) fflush(fp);
+ }
if (!iamremote) {
va_start(ap, fmt);