summaryrefslogtreecommitdiffstats
path: root/lib/command_parse.y
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-11-14 23:27:29 +0100
committerDavid Lamparter <equinox@diac24.net>2019-11-30 00:38:32 +0100
commit154e9ca142bddf748f12a8042519ec6438364625 (patch)
treed96c1306241b608e8c2048f73862a369abaa5470 /lib/command_parse.y
parentlib: gcc 4.x workaround v2 for frr_interface_info (diff)
downloadfrr-154e9ca142bddf748f12a8042519ec6438364625.tar.xz
frr-154e9ca142bddf748f12a8042519ec6438364625.zip
lib: make cmd_element & qobj_type const
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/command_parse.y')
-rw-r--r--lib/command_parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y
index 062a4bb30..5dc19d2c9 100644
--- a/lib/command_parse.y
+++ b/lib/command_parse.y
@@ -84,7 +84,7 @@
struct parser_ctx {
yyscan_t scanner;
- struct cmd_element *el;
+ const struct cmd_element *el;
struct graph *graph;
struct graph_node *currnode;
@@ -379,7 +379,7 @@ selector: '[' selector_seq_seq ']' varname_token
DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)")
void
-cmd_graph_parse (struct graph *graph, struct cmd_element *cmd)
+cmd_graph_parse (struct graph *graph, const struct cmd_element *cmd)
{
struct parser_ctx ctx = { .graph = graph, .el = cmd };
@@ -485,11 +485,11 @@ terminate_graph (CMD_YYLTYPE *locp, struct parser_ctx *ctx,
{
// end of graph should look like this
// * -> finalnode -> END_TKN -> cmd_element
- struct cmd_element *element = ctx->el;
+ const struct cmd_element *element = ctx->el;
struct graph_node *end_token_node =
new_token_node (ctx, END_TKN, CMD_CR_TEXT, "");
struct graph_node *end_element_node =
- graph_new_node (ctx->graph, element, NULL);
+ graph_new_node (ctx->graph, (void *)element, NULL);
if (ctx->docstr && strlen (ctx->docstr) > 1) {
zlog_debug ("Excessive docstring while parsing '%s'", ctx->el->string);