string-util: use strneq

This commit is contained in:
Mike Yuan
2024-01-04 16:48:42 +08:00
parent 3c1e6909d5
commit 53190aa693

View File

@@ -1537,7 +1537,7 @@ char *strrstr(const char *haystack, const char *needle) {
return strchr(haystack, 0);
for (const char *p = haystack; *p; p++)
if (strncmp(p, needle, l) == 0)
if (strneq(p, needle, l))
f = p;
return (char*) f;