Skip to content

Commit 7f2bd59

Browse files
nielsdosbon
authored and
bon
committed
Remove useless hashmap check
php_libxml_unlink_entity is called from a hashmap iterator, so using xmlHashLookup to check if it comes from that hashmap will always be true.
1 parent 00fe5a8 commit 7f2bd59

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/libxml/libxml.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ static void php_libxml_unlink_entity(void *data, void *table, const xmlChar *nam
107107
{
108108
xmlEntityPtr entity = data;
109109
if (entity->_private != NULL) {
110-
if (xmlHashLookup(table, name) == entity) {
111-
xmlHashRemoveEntry(table, name, NULL);
112-
}
110+
xmlHashRemoveEntry(table, name, NULL);
113111
}
114112
}
115113

0 commit comments

Comments
 (0)