From 4989672ac0d8c7766b2ccd904546127e800a8de7 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 8 Jan 2007 05:01:28 +0000 Subject: 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 --- src/log.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/log.c b/src/log.c index d38de4f25..242caf31f 100644 --- a/src/log.c +++ b/src/log.c @@ -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; } -- cgit v1.2.3