1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-13 13:17:36 +03:00

Remove always-false check old == cur

This case is already checked at the start of the function.
There it returns NULL, which seems more correct.
This commit is contained in:
Niels Dossche 2023-11-02 14:05:31 +01:00 committed by Nick Wellnhofer
parent 2766520062
commit 6fadd7980a

3
tree.c
View File

@ -3842,9 +3842,6 @@ xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) {
xmlUnlinkNode(old);
return(old);
}
if (cur == old) {
return(old);
}
if ((old->type==XML_ATTRIBUTE_NODE) && (cur->type!=XML_ATTRIBUTE_NODE)) {
return(old);
}