summaryrefslogtreecommitdiffstats
path: root/libcnary/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/node.c')
-rw-r--r--libcnary/node.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libcnary/node.c b/libcnary/node.c
index 4b550dd..c24ca7a 100644
--- a/libcnary/node.c
+++ b/libcnary/node.c
@@ -26,7 +26,6 @@
26 26
27#include "node.h" 27#include "node.h"
28#include "node_list.h" 28#include "node_list.h"
29#include "node_iterator.h"
30 29
31void node_destroy(node_t* node) { 30void node_destroy(node_t* node) {
32 if(!node) return; 31 if(!node) return;
@@ -114,7 +113,6 @@ int node_insert(node_t* parent, unsigned int node_index, node_t* child)
114static void _node_debug(node_t* node, unsigned int depth) { 113static void _node_debug(node_t* node, unsigned int depth) {
115 unsigned int i = 0; 114 unsigned int i = 0;
116 node_t* current = NULL; 115 node_t* current = NULL;
117 node_iterator_t* iter = NULL;
118 for(i = 0; i < depth; i++) { 116 for(i = 0; i < depth; i++) {
119 printf("\t"); 117 printf("\t");
120 } 118 }
@@ -128,11 +126,9 @@ static void _node_debug(node_t* node, unsigned int depth) {
128 if(node->parent) { 126 if(node->parent) {
129 printf("NODE\n"); 127 printf("NODE\n");
130 } 128 }
131 iter = node_iterator_create(node->children); 129 for (current = node_first_child(node); current; current = node_next_sibling(current)) {
132 while ((current = iter->next(iter))) {
133 _node_debug(current, depth+1); 130 _node_debug(current, depth+1);
134 } 131 }
135 node_iterator_destroy(iter);
136 } 132 }
137 133
138} 134}