diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-23 09:56:19 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-23 10:07:58 +0200 |
commit | 72e8719ed08135e737f77e4f4419fc62620cd13b (patch) | |
tree | fbe941ee4a765020e8e69a17efb16ebc4bed0dca | |
parent | 7fedee873f0ae977aac1008daa87713a80fc9267 (diff) | |
download | php-git-72e8719ed08135e737f77e4f4419fc62620cd13b.tar.gz |
Fix a few ZEND_UNREACHABLE() calls
-rw-r--r-- | ext/dom/document.c | 3 | ||||
-rw-r--r-- | ext/standard/net.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index b580842667..d3a8fa43a5 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1102,7 +1102,8 @@ PHP_METHOD(DOMDocument, __construct) } intern->document = NULL; if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) { - RETURN_FALSE; + /* docp is always non-null so php_libxml_increment_doc_ref() never returns -1 */ + ZEND_UNREACHABLE(); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern); } diff --git a/ext/standard/net.c b/ext/standard/net.c index 424dad44f4..2700c7b243 100644 --- a/ext/standard/net.c +++ b/ext/standard/net.c @@ -301,7 +301,7 @@ PHP_FUNCTION(net_get_interfaces) { freeifaddrs(addrs); #else /* Should never happen as we never register the function */ - ZEND_UNREACHABLE("No support for net_get_interfaces"); + ZEND_UNREACHABLE(); #endif } /* }}} */ |