From 25c96f92f4182711e81ea982f3d5f3e3259e5d9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Santoro?= Date: Wed, 21 Dec 2016 21:14:04 +0000 Subject: [PATCH] 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. --- ext/opcache/ZendAccelerator.c | 4 ++-- 1 file 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); } -- 2.40.0