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
This commit is contained in:
J. Alexander Treuman 2007-01-08 05:01:28 +00:00
parent 438c1add9d
commit 4989672ac0

View File

@ -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;
}