From 78602b80294194b31fd402843c95af3bbb5c9999 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 9 Aug 2016 21:31:11 +0000 Subject: [PATCH] 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 --- lib/command_graph.h | 1 - lib/command_match.c | 1 - lib/command_parse.y | 1 - 3 files changed, 3 deletions(-) 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 -- 2.39.5