summaryrefslogtreecommitdiff
path: root/lib/command_graph.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-08-11 17:50:58 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-08-11 17:50:58 +0000
commit55589d304c7b5765068ae75d5223d4ff634b7fc3 (patch)
tree95fd7ad514568d271acdd76357ede52cf488760c /lib/command_graph.c
parent9b887497e855b3fbd818a51df7c089c7a9943575 (diff)
lib: Refactor CLI interface function names
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_graph.c')
-rw-r--r--lib/command_graph.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/command_graph.c b/lib/command_graph.c
index f249935771..323bd3e953 100644
--- a/lib/command_graph.c
+++ b/lib/command_graph.c
@@ -26,7 +26,7 @@
#include "memory.h"
struct graph_node *
-add_node (struct graph_node *parent, struct graph_node *child)
+graphnode_add_child (struct graph_node *parent, struct graph_node *child)
{
vector_set (parent->children, child);
child->refs++;
@@ -34,7 +34,7 @@ add_node (struct graph_node *parent, struct graph_node *child)
}
struct graph_node *
-new_node (enum graph_node_type type)
+graphnode_new (enum graph_node_type type)
{
struct graph_node *node =
XCALLOC(MTYPE_CMD_TOKENS, sizeof(struct graph_node));
@@ -46,7 +46,7 @@ new_node (enum graph_node_type type)
}
void
-delete_node (struct graph_node *node)
+graphnode_delete (struct graph_node *node)
{
if (!node) return;
if (node->children) vector_free (node->children);
@@ -57,17 +57,17 @@ delete_node (struct graph_node *node)
}
void
-delete_graph (struct graph_node *start)
+graphnode_delete_graph (struct graph_node *start)
{
if (start && start->children && vector_active (start->children) > 0)
{
for (unsigned int i = 0; i < vector_active (start->children); i++)
{
- delete_graph (vector_slot(start->children, i));
+ graphnode_delete (vector_slot(start->children, i));
vector_unset (start->children, i);
}
}
if (--(start->refs) == 0)
- delete_node (start);
+ graphnode_delete (start);
}