From: Max Kellermann Date: Fri, 7 Nov 2008 13:01:06 +0000 (+0100) Subject: main: optimized error_msg() X-Git-Tag: v0.12_alpha1~25 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c3fb219bd23333431679c49058a200561f93344d;p=ncmpc.git main: optimized error_msg() The pointer has already been checked for NULL, eliminate that check. --- diff --git a/src/main.c b/src/main.c index 6a03363..1e65cfe 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; }