1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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.
This commit is contained in:
Niels Dossche
2023-08-06 14:44:15 +02:00
parent 3ad5029442
commit 5018dfecdf

View File

@@ -107,9 +107,7 @@ static void php_libxml_unlink_entity(void *data, void *table, const xmlChar *nam
{
xmlEntityPtr entity = data;
if (entity->_private != NULL) {
if (xmlHashLookup(table, name) == entity) {
xmlHashRemoveEntry(table, name, NULL);
}
xmlHashRemoveEntry(table, name, NULL);
}
}