diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-07-11 19:56:07 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-07-12 15:05:06 +0000 |
| commit | 2a23ca6e5293281a3c7d4a2fdbc672151ea851ee (patch) | |
| tree | 03dc35634d9d0b2733ac06fcd316dac235e1eeaa /lib/cmdtree.c | |
| parent | bbf5ffa08ddc13339f5dd762f14326f70a576c48 (diff) | |
lib: Change some includes
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/cmdtree.c')
| -rw-r--r-- | lib/cmdtree.c | 10 |
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; |
