com php-src: Fix IS_UNDEF comparisons in opcache: e xt/opcache/ZendAccelerator.c

From: Date: Thu, 22 Dec 2016 11:46:14 +0000
Subject: com php-src: Fix IS_UNDEF comparisons in opcache: e xt/opcache/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96426@lists.php.net to get a copy of this message
Commit: 25c96f92f4182711e81ea982f3d5f3e3259e5d9c Author: Sébastien Santoro <dereckson@espace-win.org> Wed, 21 Dec 2016 21:14:04 +0000 Committer: Nikita Popov <nikic@php.net> Thu, 22 Dec 2016 12:46:14 +0100 Parents: 3b2b080cbcdcadb97f9dd2db1a6e9e4200c34023 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=25c96f92f4182711e81ea982f3d5f3e3259e5d9c Log: 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. Changed paths: M ext/opcache/ZendAccelerator.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 8844da6..676e393 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); }

« previous php.cvs (#96426) next »