Claudio Jeker([email protected]) on 2020.05.12 12:42:36 +0200:
> Minimal cleanup of things not used in the bgpctl parser.
> Bulk is not used and the ADDRESS / PREFIX tokens no longer overwrite the
> action since a while.
ok benno@
>
> --
> :wq Claudio
>
> Index: parser.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpctl/parser.c,v
> retrieving revision 1.103
> diff -u -p -r1.103 parser.c
> --- parser.c 11 May 2020 07:55:18 -0000 1.103
> +++ parser.c 12 May 2020 10:25:37 -0000
> @@ -61,8 +61,7 @@ enum token_type {
> RD,
> FAMILY,
> RTABLE,
> - FILENAME,
> - BULK
> + FILENAME
> };
>
> struct token {
> @@ -592,24 +591,18 @@ match_token(int *argc, char **argv[], co
> if (parse_addr(word, &res.addr)) {
> match++;
> t = &table[i];
> - if (t->value)
> - res.action = t->value;
> }
> break;
> case PEERADDRESS:
> if (parse_addr(word, &res.peeraddr)) {
> match++;
> t = &table[i];
> - if (t->value)
> - res.action = t->value;
> }
> break;
> case PREFIX:
> if (parse_prefix(word, wordlen, &res.addr,
> &res.prefixlen)) {
> match++;
> t = &table[i];
> - if (t->value)
> - res.action = t->value;
> }
> break;
> case ASTYPE:
> @@ -797,10 +790,6 @@ match_token(int *argc, char **argv[], co
> t = &table[i];
> }
> break;
> - case BULK:
> - match++;
> - t = &table[i];
> - break;
> case ENDTOKEN:
> break;
> }
> @@ -890,7 +879,6 @@ show_valid_args(const struct token table
> case FILENAME:
> fprintf(stderr, " <filename>\n");
> break;
> - case BULK:
> case ENDTOKEN:
> break;
> }
>