summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/node.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/core/node.c b/src/core/node.c
index a09bf97..a59cc01 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -1595,7 +1595,6 @@ dom_exception _dom_node_is_equal(dom_node_internal *node,
dom_node_internal *other, bool *result)
{
dom_exception err = DOM_NO_ERR;
- dom_string *s1 = NULL, *s2 = NULL;
dom_namednodemap *m1 = NULL, *m2 = NULL;
dom_nodelist *l1 = NULL, *l2 = NULL;
*result = false;
@@ -1610,20 +1609,14 @@ dom_exception _dom_node_is_equal(dom_node_internal *node,
assert(node->owner != NULL);
assert(other->owner != NULL);
- /* Compare the node names (and prefix) */
- err = dom_node_get_node_name(node, &s1);
- if (err != DOM_NO_ERR) {
- /* error */
- goto cleanup;
- }
-
- err = dom_node_get_node_name(other, &s2);
- if (err != DOM_NO_ERR) {
- /* error */
+ /* Compare node name */
+ if (dom_string_isequal(node->name, other->name) == false) {
+ /* different */
goto cleanup;
}
- if (dom_string_isequal(s1, s2) == false) {
+ /* Compare prefix */
+ if (dom_string_isequal(node->prefix, other->prefix) == false) {
/* different */
goto cleanup;
}
@@ -1679,11 +1672,6 @@ dom_exception _dom_node_is_equal(dom_node_internal *node,
*result = true;
cleanup:
- if (s1 != NULL)
- dom_string_unref(s1);
- if (s2 != NULL)
- dom_string_unref(s2);
-
if (m1 != NULL)
dom_namednodemap_unref(m1);
if (m2 != NULL)