diff options
author | Wayne Davison <wayned@samba.org> | 2006-01-24 01:07:19 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-01-24 01:07:19 +0000 |
commit | 0ace7b2567944ae310d41c90ae7fc5a9273a77c7 (patch) | |
tree | 713efa44ed7c34be426c4eb90b52d6bff71022e1 /log.c | |
parent | ccb8f5788b6075414d0a529de2fa4cfe747b2624 (diff) | |
download | rsync-0ace7b2567944ae310d41c90ae7fc5a9273a77c7.tar.gz rsync-0ace7b2567944ae310d41c90ae7fc5a9273a77c7.tar.bz2 rsync-0ace7b2567944ae310d41c90ae7fc5a9273a77c7.zip |
FERROR messages also need to leave leading newlines unmangled.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -265,10 +265,11 @@ void rwrite(enum logcode code, char *buf, int len) case FERROR: log_got_error = 1; f = stderr; - break; + goto pre_scan; case FINFO: f = am_server ? stderr : stdout; - while (len && (*buf == '\n' || *buf == '\t')) { + pre_scan: + while (len > 1 && (*buf == '\n' || *buf == '\t')) { fputc(*buf, f); buf++; len--; |