Skip to content

Commit 98ae12e

Browse files
committed
Cleanup
1 parent 2ac46dc commit 98ae12e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/pcre/php_pcre.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
615615
char delimiter;
616616
char start_delimiter;
617617
char end_delimiter;
618-
char *p, *pp, *end_p;
618+
char *p, *pp;
619619
char *pattern;
620620
size_t pattern_len;
621621
uint32_t poptions = 0;
@@ -645,7 +645,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
645645
}
646646

647647
p = ZSTR_VAL(regex);
648-
end_p = ZSTR_VAL(regex) + ZSTR_LEN(regex);
648+
const char* end_p = ZSTR_VAL(regex) + ZSTR_LEN(regex);
649649

650650
/* Parse through the leading whitespace, and display a warning if we
651651
get to the end without encountering a delimiter. */
@@ -707,7 +707,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
707707
}
708708
}
709709

710-
if (pp == end_p) {
710+
if (pp >= end_p) {
711711
if (key != regex) {
712712
zend_string_release_ex(key, 0);
713713
}

0 commit comments

Comments
 (0)