]> granicus.if.org Git - php/commitdiff
Use ZEND_FCI_INITIALIZED macro
authorGeorge Peter Banyard <girgias@php.net>
Mon, 11 May 2020 16:42:46 +0000 (18:42 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Fri, 15 May 2020 22:36:15 +0000 (00:36 +0200)
Instead of manually checking that the fci.size is different than 0

ext/libxml/libxml.c

index 09f8ae83ed93cda63194292b6878e7e399f9e17a..9ec25d6190c114a96474bd273186f0b02c7d9b25 100644 (file)
@@ -1072,7 +1072,7 @@ PHP_FUNCTION(libxml_set_external_entity_loader)
 
        _php_libxml_destroy_fci(&LIBXML(entity_loader).fci, &LIBXML(entity_loader).object);
 
-       if (fci.size > 0) { /* argument not null */
+       if (ZEND_FCI_INITIALIZED(fci)) { /* argument not null */
                LIBXML(entity_loader).fci = fci;
                Z_ADDREF(fci.function_name);
                if (fci.object != NULL) {