aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-07 14:01:06 +0100
committerMax Kellermann <max@duempel.org>2008-11-07 14:01:06 +0100
commitc3fb219bd23333431679c49058a200561f93344d (patch)
treedc7c12ced7b0f04bbac8f4371b4d92cf1fbd8733 /src/main.c
parentb2617354f437ac905057f521b47b8be6c3addcd1 (diff)
downloadmpd-c3fb219bd23333431679c49058a200561f93344d.tar.gz
mpd-c3fb219bd23333431679c49058a200561f93344d.tar.xz
mpd-c3fb219bd23333431679c49058a200561f93344d.zip
main: optimized error_msg()
The pointer has already been checked for NULL, eliminate that check.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 6a0336349..1e65cfeb8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -66,8 +66,9 @@ error_msg(const gchar *msg)
if ((p = strchr(msg, '}')) == NULL)
return msg;
- while (p && *p && (*p=='}' || *p==' '))
+ do {
p++;
+ } while (*p == '}' || * p== ' ');
return p;
}