From ec3de14afb42c9ed7ae29e889959a6b308990ff7 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 8 Nov 2024 14:50:54 +0100 Subject: [PATCH] Fix i386 release build warning Closes GH-16730 --- main/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/getopt.c b/main/getopt.c index 85871f16402..65ce94ae9bb 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -97,7 +97,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char arg_start = 2; /* Check for = */ - if ((pos = php_memnstr(&argv[*optind][arg_start], "=", 1, argv[*optind]+arg_end)) != NULL) { + if ((pos = memchr(&argv[*optind][arg_start], '=', arg_end - arg_start)) != NULL) { arg_end = pos-&argv[*optind][arg_start]; arg_start++; } else {