summaryrefslogtreecommitdiff
path: root/lib/cmdtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmdtree.c')
-rw-r--r--lib/cmdtree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/cmdtree.c b/lib/cmdtree.c
index 5bb76cce3a..c7bdf381c7 100644
--- a/lib/cmdtree.c
+++ b/lib/cmdtree.c
@@ -6,18 +6,19 @@
* @author Quentin Young <qlyoung@cumulusnetworks.com>
*/
-#include "memory.h"
+#include <zebra.h>
#include "cmdtree.h"
+#include "memory.h"
struct graph_node *
add_node(struct graph_node *parent, struct graph_node *child)
{
- int index;
+ unsigned int index;
struct graph_node *p_child;
for (index = 0; index < vector_active(parent->children); index++)
{
- *p_child = vector_slot(parent->children, index);
+ p_child = vector_slot(parent->children, index);
if (cmp_node(child, p_child))
return p_child;
}
@@ -28,12 +29,13 @@ add_node(struct graph_node *parent, struct graph_node *child)
int
cmp_node(struct graph_node *first, struct graph_node *second)
{
+ return 1;
}
struct graph_node *
new_node(enum graph_node_type type)
{
- struct graph_node *node = XMALLOC(MTYPE_TMP, sizeof(graph_node));
+ struct graph_node *node = malloc(sizeof(struct graph_node));
node->type = type;
node->children = vector_init(VECTOR_MIN_SIZE);
node->is_leaf = 0;