diff options
| -rw-r--r-- | libcnary/include/node_list.h | 2 | ||||
| -rw-r--r-- | libcnary/node.c | 2 | ||||
| -rw-r--r-- | libcnary/node_list.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libcnary/include/node_list.h b/libcnary/include/node_list.h index 7b9e311..380916e 100644 --- a/libcnary/include/node_list.h +++ b/libcnary/include/node_list.h | |||
| @@ -38,7 +38,7 @@ typedef struct node_list_t { | |||
| 38 | } node_list_t; | 38 | } node_list_t; |
| 39 | 39 | ||
| 40 | void node_list_destroy(struct node_list_t* list); | 40 | void node_list_destroy(struct node_list_t* list); |
| 41 | struct node_list_t* node_list_create(struct node_t* node); | 41 | struct node_list_t* node_list_create(); |
| 42 | 42 | ||
| 43 | int node_list_add(node_list_t* list, node_t* node); | 43 | int node_list_add(node_list_t* list, node_t* node); |
| 44 | int node_list_insert(node_list_t* list, unsigned int index, node_t* node); | 44 | int node_list_insert(node_list_t* list, unsigned int index, node_t* node); |
diff --git a/libcnary/node.c b/libcnary/node.c index fadc9de..6026925 100644 --- a/libcnary/node.c +++ b/libcnary/node.c | |||
| @@ -61,7 +61,7 @@ node_t* node_create(node_t* parent, void* data) { | |||
| 61 | node->isLeaf = TRUE; | 61 | node->isLeaf = TRUE; |
| 62 | node->isRoot = TRUE; | 62 | node->isRoot = TRUE; |
| 63 | node->parent = NULL; | 63 | node->parent = NULL; |
| 64 | node->children = node_list_create(node); | 64 | node->children = node_list_create(); |
| 65 | 65 | ||
| 66 | // Pass NULL to create a root node | 66 | // Pass NULL to create a root node |
| 67 | if(parent != NULL) { | 67 | if(parent != NULL) { |
diff --git a/libcnary/node_list.c b/libcnary/node_list.c index 4b268e0..dd143bb 100644 --- a/libcnary/node_list.c +++ b/libcnary/node_list.c | |||
| @@ -35,7 +35,7 @@ void node_list_destroy(node_list_t* list) { | |||
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | node_list_t* node_list_create(node_t* node) { | 38 | node_list_t* node_list_create() { |
| 39 | node_list_t* list = (node_list_t*) malloc(sizeof(node_list_t)); | 39 | node_list_t* list = (node_list_t*) malloc(sizeof(node_list_t)); |
| 40 | if(list == NULL) { | 40 | if(list == NULL) { |
| 41 | return NULL; | 41 | return NULL; |
