Skip to content

Commit 72e8719

Browse files
committed
Fix a few ZEND_UNREACHABLE() calls
1 parent 7fedee8 commit 72e8719

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext/dom/document.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,8 @@ PHP_METHOD(DOMDocument, __construct)
11021102
}
11031103
intern->document = NULL;
11041104
if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) {
1105-
RETURN_FALSE;
1105+
/* docp is always non-null so php_libxml_increment_doc_ref() never returns -1 */
1106+
ZEND_UNREACHABLE();
11061107
}
11071108
php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern);
11081109
}

ext/standard/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ PHP_FUNCTION(net_get_interfaces) {
301301
freeifaddrs(addrs);
302302
#else
303303
/* Should never happen as we never register the function */
304-
ZEND_UNREACHABLE("No support for net_get_interfaces");
304+
ZEND_UNREACHABLE();
305305
#endif
306306
}
307307
/* }}} */

0 commit comments

Comments
 (0)