summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_operators.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index b42ad7f395..ef88dfb584 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -148,7 +148,6 @@ static zend_always_inline const char *
zend_memnstr(const char *haystack, const char *needle, size_t needle_len, const char *end)
{
const char *p = haystack;
- const char ne = needle[needle_len-1];
ptrdiff_t off_p;
size_t off_s;
@@ -168,6 +167,7 @@ zend_memnstr(const char *haystack, const char *needle, size_t needle_len, const
}
if (EXPECTED(off_s < 1024 || needle_len < 9)) { /* glibc memchr is faster when needle is too short */
+ const char ne = needle[needle_len-1];
end -= needle_len;
while (p <= end) {
@@ -210,7 +210,6 @@ static zend_always_inline const char *
zend_memnrstr(const char *haystack, const char *needle, size_t needle_len, const char *end)
{
const char *p = end;
- const char ne = needle[needle_len-1];
ptrdiff_t off_p;
size_t off_s;
@@ -230,6 +229,7 @@ zend_memnrstr(const char *haystack, const char *needle, size_t needle_len, const
}
if (EXPECTED(off_s < 1024 || needle_len < 3)) {
+ const char ne = needle[needle_len-1];
p -= needle_len;
do {