librb: minor adjustments to rb_strcasestr fallback to avoid warnings.

This commit is contained in:
Elizabeth Myers 2016-04-10 10:10:46 -05:00
parent 7a21fb5b34
commit 9af0d38291
1 changed files with 2 additions and 2 deletions

View File

@ -213,9 +213,9 @@ rb_strcasestr(const char *s, const char *find)
size_t len_f = strlen(find);
if(*s == '\0')
return s;
return (char *)s;
for(char *c = s; *c != '\0'; c++)
for(char *c = (char *)s; *c != '\0'; c++)
{
if(*c == *find && strncasecmp(c, find, len_f) == 0)
return c;