summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-24 13:05:11 (GMT)
committer Vincent Sanders <vince@netsurf-browser.org>2014-01-24 13:05:11 (GMT)
commitfdaf91e209471f4acae867f07666a2625a668f80 (patch)
tree8ea8ea75a8018ac27ca5e5bedf5bb5ab32fbd908
parent6e31ecb214b26cc9d1d41e7b196d4cc57b4494b4 (diff)
downloadlibdom-fdaf91e209471f4acae867f07666a2625a668f80.tar.gz
libdom-fdaf91e209471f4acae867f07666a2625a668f80.tar.bz2
ensure result value is propogated (coverity 1127073)
-rw-r--r--src/core/node.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/node.c b/src/core/node.c
index 072fdcd..e500f3a 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -50,7 +50,7 @@ static inline dom_exception _dom_node_attach_range(dom_node_internal *first,
dom_node_internal *parent,
dom_node_internal *previous,
dom_node_internal *next);
-static inline void _dom_node_detach_range(dom_node_internal *first,
+static inline dom_exception _dom_node_detach_range(dom_node_internal *first,
dom_node_internal *last);
static inline void _dom_node_replace(dom_node_internal *old,
dom_node_internal *replacement);
@@ -2091,12 +2091,13 @@ dom_exception _dom_node_attach_range(dom_node_internal *first,
*
* The range is assumed to be a linked list of sibling nodes.
*/
-void _dom_node_detach_range(dom_node_internal *first,
+dom_exception _dom_node_detach_range(dom_node_internal *first,
dom_node_internal *last)
{
bool success = true;
dom_node_internal *parent;
dom_node_internal *n;
+ dom_exception err = DOM_NO_ERR;
if (first->previous != NULL)
first->previous->next = last->next;
@@ -2111,8 +2112,8 @@ void _dom_node_detach_range(dom_node_internal *first,
parent = first->parent;
for (n = first; n != last->next; n = n->next) {
/* Dispatch a DOMNodeRemoval event */
- dom_node_dispatch_node_change_event(n->owner, n, n->parent,
- DOM_MUTATION_REMOVAL, &success);
+ err = dom_node_dispatch_node_change_event(n->owner, n,
+ n->parent, DOM_MUTATION_REMOVAL, &success);
n->parent = NULL;
}
@@ -2123,6 +2124,8 @@ void _dom_node_detach_range(dom_node_internal *first,
first->previous = NULL;
last->next = NULL;
+
+ return err;
}
/**