diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-26 17:24:44 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-26 17:24:44 +0000 |
| commit | 4fbf55e9868b721c46cb7ebc2b639d8a066afbb0 (patch) | |
| tree | b620f5185e2016c99abd9cd602eef376f2328ad2 /lib/grammar_sandbox.c | |
| parent | 292caba3bac24ba05e553b01f7c13fa8ab4b374e (diff) | |
| parent | 8ea37652c714edcd913d5dc02a0bfc5968fdc45e (diff) | |
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-ipv4-plus-label-misc3
Diffstat (limited to 'lib/grammar_sandbox.c')
| -rw-r--r-- | lib/grammar_sandbox.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index cfc3fb7982..f4a8df26c0 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -503,9 +503,8 @@ struct message tokennames[] = { item(JOIN_TKN), item(START_TKN), // first token in line item(END_TKN), // last token in line - { 0, NULL } + { 0 } }; -size_t tokennames_max = array_size(tokennames); /** * Pretty-prints a graph, assuming it is a tree. @@ -522,7 +521,7 @@ pretty_print_graph (struct vty *vty, struct graph_node *start, int level, struct cmd_token *tok = start->data; snprintf(tokennum, sizeof(tokennum), "%d?", tok->type); - vty_out(vty, "%s", LOOKUP_DEF(tokennames, tok->type, tokennum)); + vty_out(vty, "%s", lookup_msg(tokennames, tok->type, NULL)); if (tok->text) vty_out(vty, ":\"%s\"", tok->text); if (tok->varname) @@ -591,7 +590,7 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start, snprintf(tokennum, sizeof(tokennum), "%d?", tok->type); fprintf(ofd, " n%p [ shape=box, label=<", start); - fprintf(ofd, "<b>%s</b>", LOOKUP_DEF(tokennames, tok->type, tokennum)); + fprintf(ofd, "<b>%s</b>", lookup_msg(tokennames, tok->type, NULL)); if (tok->attr == CMD_ATTR_DEPRECATED) fprintf(ofd, " (d)"); else if (tok->attr == CMD_ATTR_HIDDEN) |
