]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Remove unnecessary node pointer
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 9 Aug 2016 21:31:11 +0000 (21:31 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 9 Aug 2016 21:31:11 +0000 (21:31 +0000)
Selector and option heads had pointers to their
ends, but this turned out to be unnecessary

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command_graph.h
lib/command_match.c
lib/command_parse.y

index 48c3d9cd0a98deff1f8d59c63c9ad88373f80e4a..e42b8336e5bc6d90f142acf0b58ec966d2c43e8d 100644 (file)
@@ -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
index 9b9f8a0ec5f9d58b42e6b699287e284181579128..b323bc5809db2c41b248086f5090706f5273149b 100644 (file)
@@ -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;
index 690832357a383c23352c6977f5d190bc63c2fef0..56c58fdaedc149a8a16b909a7c2bd17a5f267870 100644 (file)
@@ -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