small optimization
This commit is contained in:
parent
3feb2fc535
commit
809a6e3104
@ -15,11 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
char* last_char_is(const char *s, int c)
|
char* last_char_is(const char *s, int c)
|
||||||
{
|
{
|
||||||
char *sret;
|
|
||||||
if (s) {
|
if (s) {
|
||||||
sret = strrchr(s, c);
|
s = strrchr(s, c);
|
||||||
if (sret && !sret[1])
|
if (s && !s[1])
|
||||||
return sret;
|
return (char*)s;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user