From 53190aa693d6347ff344afd666ccdcdb5163c92d Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Thu, 4 Jan 2024 16:48:42 +0800 Subject: [PATCH] string-util: use strneq --- src/basic/string-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/string-util.c b/src/basic/string-util.c index f6453990bd..3c34d6b455 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -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; -- 2.25.1