aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-24 22:42:44 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-24 22:42:44 +0000
commit809a6e310443d0b5010c8b293cab0160608c1b02 (patch)
tree1ebb9f979ab2e72b6679eb0326ccd54dc001a201
parent3feb2fc535db445951314f57a8f7ecc460b456d9 (diff)
downloadbusybox-w32-809a6e310443d0b5010c8b293cab0160608c1b02.tar.gz
busybox-w32-809a6e310443d0b5010c8b293cab0160608c1b02.tar.bz2
busybox-w32-809a6e310443d0b5010c8b293cab0160608c1b02.zip
small optimization
-rw-r--r--libbb/last_char_is.c7
1 files changed, 3 insertions, 4 deletions
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 @@
15 */ 15 */
16char* last_char_is(const char *s, int c) 16char* last_char_is(const char *s, int c)
17{ 17{
18 char *sret;
19 if (s) { 18 if (s) {
20 sret = strrchr(s, c); 19 s = strrchr(s, c);
21 if (sret && !sret[1]) 20 if (s && !s[1])
22 return sret; 21 return (char*)s;
23 } 22 }
24 return NULL; 23 return NULL;
25} 24}