summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-01-08 05:01:28 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-01-08 05:01:28 +0000
commit4989672ac0d8c7766b2ccd904546127e800a8de7 (patch)
tree4d74ef06cbf2c0597ba0d970a2e6a361a0dd3581 /src/log.c
parent438c1add9de7aff5968add3b9e02fac30a62e74a (diff)
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/log.c')
-rw-r--r--src/log.c9
1 files changed, 4 insertions, 5 deletions
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;
}