Commit 4989672a authored by J. Alexander Treuman's avatar J. Alexander Treuman

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
parent 438c1add
...@@ -109,11 +109,10 @@ void flushWarningLog(void) ...@@ -109,11 +109,10 @@ void flushWarningLog(void)
if (warningBuffer != NULL) if (warningBuffer != NULL)
{ {
while (s != NULL) { while (s != NULL) {
char * next = strchr(s, '\n'); char *next = strchr(s, '\n');
if (next != NULL) { if (next == NULL) break;
*next = '\0'; *next = '\0';
next++; next++;
}
fprintf(stderr, "%s\n", s); fprintf(stderr, "%s\n", s);
s = next; s = next;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment