diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-01-08 05:01:28 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-01-08 05:01:28 +0000 |
commit | 4989672ac0d8c7766b2ccd904546127e800a8de7 (patch) | |
tree | 4d74ef06cbf2c0597ba0d970a2e6a361a0dd3581 /src | |
parent | 438c1add9de7aff5968add3b9e02fac30a62e74a (diff) | |
download | mpd-4989672ac0d8c7766b2ccd904546127e800a8de7.tar.gz mpd-4989672ac0d8c7766b2ccd904546127e800a8de7.tar.xz mpd-4989672ac0d8c7766b2ccd904546127e800a8de7.zip |
Fixed some silly logic that caused an extra \n to be printed when flushing
warning messages.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5228 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/log.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -109,11 +109,10 @@ void flushWarningLog(void) if (warningBuffer != NULL) { while (s != NULL) { - char * next = strchr(s, '\n'); - if (next != NULL) { - *next = '\0'; - next++; - } + char *next = strchr(s, '\n'); + if (next == NULL) break; + *next = '\0'; + next++; fprintf(stderr, "%s\n", s); s = next; } |