Skip to content

Commit 25c96f9

Browse files
derecksonnikic
authored andcommitted
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.
1 parent 3b2b080 commit 25c96f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ static void accel_use_shm_interned_strings(void)
582582

583583
for (j = 0; j < ce->constants_table.nNumUsed; j++) {
584584
q = ce->constants_table.arData + j;
585-
if (!Z_TYPE(q->val) == IS_UNDEF) continue;
585+
if (Z_TYPE(q->val) == IS_UNDEF) continue;
586586
if (q->key) {
587587
q->key = accel_new_interned_string(q->key);
588588
}
@@ -592,7 +592,7 @@ static void accel_use_shm_interned_strings(void)
592592
/* constant hash keys */
593593
for (idx = 0; idx < EG(zend_constants)->nNumUsed; idx++) {
594594
p = EG(zend_constants)->arData + idx;
595-
if (!Z_TYPE(p->val) == IS_UNDEF) continue;
595+
if (Z_TYPE(p->val) == IS_UNDEF) continue;
596596
if (p->key) {
597597
p->key = accel_new_interned_string(p->key);
598598
}

0 commit comments

Comments
 (0)