summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Santoro <dereckson@espace-win.org>2016-12-21 21:14:04 +0000
committerNikita Popov <nikic@php.net>2016-12-22 12:46:14 +0100
commit25c96f92f4182711e81ea982f3d5f3e3259e5d9c (patch)
tree8937232d0fb03535386ecc2add75b596e02b2b03
parent3b2b080cbcdcadb97f9dd2db1a6e9e4200c34023 (diff)
downloadphp-git-25c96f92f4182711e81ea982f3d5f3e3259e5d9c.tar.gz
Fix IS_UNDEF comparisons in opcache
These conditions were formerly `!q->pData` and `!p->pData`, and should now be detected as undefined variables, using the special type IS_UNDEF. Incidentally, this syntax raised a logical-not-parentheses compiler warning, now gone.
-rw-r--r--ext/opcache/ZendAccelerator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 8844da6d59..676e3939a8 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -582,7 +582,7 @@ static void accel_use_shm_interned_strings(void)
for (j = 0; j < ce->constants_table.nNumUsed; j++) {
q = ce->constants_table.arData + j;
- if (!Z_TYPE(q->val) == IS_UNDEF) continue;
+ if (Z_TYPE(q->val) == IS_UNDEF) continue;
if (q->key) {
q->key = accel_new_interned_string(q->key);
}
@@ -592,7 +592,7 @@ static void accel_use_shm_interned_strings(void)
/* constant hash keys */
for (idx = 0; idx < EG(zend_constants)->nNumUsed; idx++) {
p = EG(zend_constants)->arData + idx;
- if (!Z_TYPE(p->val) == IS_UNDEF) continue;
+ if (Z_TYPE(p->val) == IS_UNDEF) continue;
if (p->key) {
p->key = accel_new_interned_string(p->key);
}