Skip to content

Commit 50b4df1

Browse files
authored
Get rid of return value for php_libxml_unregister_node() (#11398)
1 parent a6911cb commit 50b4df1

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ext/libxml/libxml.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int php_libxml_clear_object(php_libxml_node_object *object)
113113
return php_libxml_decrement_doc_ref(object);
114114
}
115115

116-
static int php_libxml_unregister_node(xmlNodePtr nodep)
116+
static void php_libxml_unregister_node(xmlNodePtr nodep)
117117
{
118118
php_libxml_node_object *wrapper;
119119

@@ -130,8 +130,6 @@ static int php_libxml_unregister_node(xmlNodePtr nodep)
130130
nodeptr->node = NULL;
131131
}
132132
}
133-
134-
return -1;
135133
}
136134

137135
static void php_libxml_node_free(xmlNodePtr node)
@@ -209,9 +207,7 @@ PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node)
209207

210208
curnode = node->next;
211209
xmlUnlinkNode(node);
212-
if (php_libxml_unregister_node(node) == 0) {
213-
node->doc = NULL;
214-
}
210+
php_libxml_unregister_node(node);
215211
php_libxml_node_free(node);
216212
}
217213
}
@@ -1270,9 +1266,7 @@ PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node)
12701266
default:
12711267
php_libxml_node_free_list((xmlNodePtr) node->properties);
12721268
}
1273-
if (php_libxml_unregister_node(node) == 0) {
1274-
node->doc = NULL;
1275-
}
1269+
php_libxml_unregister_node(node);
12761270
php_libxml_node_free(node);
12771271
} else {
12781272
php_libxml_unregister_node(node);

0 commit comments

Comments
 (0)