From: Quentin Young Date: Tue, 9 Aug 2016 21:31:11 +0000 (+0000) Subject: lib: Remove unnecessary node pointer X-Git-Tag: frr-3.0-branchpoint~129^2~253 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=78602b80294194b31fd402843c95af3bbb5c9999;p=matthieu%2Ffrr.git lib: Remove unnecessary node pointer Selector and option heads had pointers to their ends, but this turned out to be unnecessary Signed-off-by: Quentin Young --- diff --git a/lib/command_graph.h b/lib/command_graph.h index 48c3d9cd0a..e42b8336e5 100644 --- a/lib/command_graph.h +++ b/lib/command_graph.h @@ -59,7 +59,6 @@ struct graph_node { enum graph_node_type type; // data type this node matches or holds vector children; // this node's children - struct graph_node *end; // pointer to end for SELECTOR_GN & OPTION_GN char *text; // original format text char *doc; // docstring for this node diff --git a/lib/command_match.c b/lib/command_match.c index 9b9f8a0ec5..b323bc5809 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -469,7 +469,6 @@ copy_node (struct graph_node *node) { struct graph_node *new = new_node(node->type); new->children = NULL; - new->end = NULL; new->text = node->text ? XSTRDUP(MTYPE_CMD_TOKENS, node->text) : NULL; new->value = node->value; new->min = node->min; diff --git a/lib/command_parse.y b/lib/command_parse.y index 690832357a..56c58fdaed 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -303,7 +303,6 @@ selector_element: selector_element_root selector_token_seq assert(!selnode_start && !selnode_end); // both should be null selnode_start = new_node (SELECTOR_GN); // diverging node selnode_end = new_node (NUL_GN); // converging node - selnode_start->end = selnode_end; // duh } // add element head as a child of the selector