From c3fb219bd23333431679c49058a200561f93344d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2008 14:01:06 +0100 Subject: [PATCH] main: optimized error_msg() The pointer has already been checked for NULL, eliminate that check. --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2