{
assert(haystack != NULL && needle != NULL);
- if (needle == '\0')
+ if (*needle == '\0')
return (char *)haystack;
for (; *haystack != '\0'; haystack++) {
assert(haystack != NULL && needle != NULL);
- if (needle == '\0')
+ if (*needle == '\0')
return (char *)haystack;
r_mb = charalloc(MB_CUR_MAX);
{
assert(haystack != NULL && needle != NULL && rev_start != NULL);
- if (needle == '\0')
+ if (*needle == '\0')
return (char *)rev_start;
for (; rev_start >= haystack; rev_start--) {
{
assert(haystack != NULL && needle != NULL && rev_start != NULL);
- if (needle == '\0')
+ if (*needle == '\0')
return (char *)rev_start;
for (; rev_start >= haystack; rev_start--) {
assert(haystack != NULL && needle != NULL && rev_start != NULL);
- if (needle == '\0')
+ if (*needle == '\0')
return (char *)rev_start;
r_mb = charalloc(MB_CUR_MAX);