diff options
author | Nikias Bassen | 2012-01-12 00:29:22 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-01-12 00:29:22 +0100 |
commit | 83fa6982dfddaed93195402e2e0b7435bc707e06 (patch) | |
tree | 8da1311265233cf5a1f468db5b4f0db39d786aab /libcnary/node.c | |
parent | fd1dd885e29f6ba45dfd90575a210fd4139ec45c (diff) | |
download | libplist-83fa6982dfddaed93195402e2e0b7435bc707e06.tar.gz libplist-83fa6982dfddaed93195402e2e0b7435bc707e06.tar.bz2 |
libcnary: fix missing return value and missing variable initialization
Diffstat (limited to 'libcnary/node.c')
-rw-r--r-- | libcnary/node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcnary/node.c b/libcnary/node.c index 1f9f669..264c78e 100644 --- a/libcnary/node.c +++ b/libcnary/node.c @@ -104,7 +104,7 @@ int node_detach(node_t* parent, node_t* child) { int node_insert(node_t* parent, unsigned int index, node_t* child) { - if (!parent || !child) return; + if (!parent || !child) return -1; child->isLeaf = TRUE; child->isRoot = FALSE; child->parent = parent; @@ -209,7 +209,7 @@ int node_child_position(struct node_t* parent, node_t* child) node_t* node_copy_deep(node_t* node, copy_func_t copy_func) { if (!node) return NULL; - void *data; + void *data = NULL; if (copy_func) { data = copy_func(node->data); } |