mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
librb: minor adjustments to rb_strcasestr fallback to avoid warnings.
This commit is contained in:
parent
7a21fb5b34
commit
9af0d38291
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue