From 6fadd7980a4c5e6adb9ca336b203188b71dc9c9d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:05:31 +0100 Subject: [PATCH] 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. --- tree.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tree.c b/tree.c index 9e792b3e..6b3e4024 100644 --- a/tree.c +++ b/tree.c @@ -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); }