diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-05-12 13:26:03 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-05-12 13:26:03 +0000 |
commit | e5a0bf78f71deb45fa20c46acf061566f6e6f074 (patch) | |
tree | bf0bfa21f9f12ae8e5923e597ee92fde53aeca3e /usr.sbin/bgpctl | |
parent | b8ca9735f6cdac697cdb633cf56567845decaec7 (diff) |
Remove unused token BULK and for PREFIX and ADDRESS the table value is always
NULL so there is no need to change action in those cases. This was used some
time ago by the show rib code.
OK kn@, sthen@, benno@, deraadt@
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r-- | usr.sbin/bgpctl/parser.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index def7229d620..f9b6eba5928 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.103 2020/05/11 07:55:18 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.104 2020/05/12 13:26:02 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -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[], const struct token table[]) 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[], const struct token table[]) 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; } |