From: Max Kellermann Date: Fri, 2 Oct 2009 17:22:15 +0000 (+0200) Subject: screen_search: use strchr() instead of strrstr() X-Git-Tag: release-0.16~211 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=88d9c23684738a19ceaca6ac885da2e8d54e5de3;p=ncmpc.git screen_search: use strchr() instead of strrstr() strrstr() is more expensive, and we're just interested in whether there is a colon, not where. --- diff --git a/src/screen_search.c b/src/screen_search.c index 9f2fee1..b1d480d 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -206,7 +206,7 @@ search_advanced_query(char *query, struct mpdclient *c) struct filelist *fl = NULL; advanced_search_mode = FALSE; - if( g_strrstr(query, ":") == NULL ) + if (strchr(query, ':') == NULL) return NULL; strv = g_strsplit_set(query, ": ", 0);