From: Denis Vlasenko Date: Fri, 24 Nov 2006 22:42:44 +0000 (-0000) Subject: small optimization X-Git-Tag: 1_4_0~330 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=809a6e310443d0b5010c8b293cab0160608c1b02;p=oweals%2Fbusybox.git small optimization --- diff --git a/libbb/last_char_is.c b/libbb/last_char_is.c index 80a6fe2e4..3616d5916 100644 --- a/libbb/last_char_is.c +++ b/libbb/last_char_is.c @@ -15,11 +15,10 @@ */ char* last_char_is(const char *s, int c) { - char *sret; if (s) { - sret = strrchr(s, c); - if (sret && !sret[1]) - return sret; + s = strrchr(s, c); + if (s && !s[1]) + return (char*)s; } return NULL; }