From: Sébastien Santoro Date: Wed, 21 Dec 2016 21:14:04 +0000 (+0000) Subject: Fix IS_UNDEF comparisons in opcache X-Git-Tag: php-7.1.1RC1~59^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25c96f92f4182711e81ea982f3d5f3e3259e5d9c;p=php 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. --- 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); }