Commit 83fa6982 authored by Nikias Bassen's avatar Nikias Bassen

libcnary: fix missing return value and missing variable initialization

parent fd1dd885
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment