diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-10-04 13:30:04 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-10-06 15:34:32 +0200 |
| commit | 9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b (patch) | |
| tree | 04b57dbd4183fd0f0b415a022e12cb72e29fdf16 /tools/permutations.c | |
| parent | 53d8bf6d7a233ccc97e0f466374878f2b8e3f657 (diff) | |
lib: make cmd_element->attr a bitmask & clarify
It already "looks" like a bitmask, but we currently can't flag a command
both YANG and HIDDEN at the same time. It really should be a bitmask.
Also clarify DEPRECATED behaviour (or the absence thereof.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tools/permutations.c')
| -rw-r--r-- | tools/permutations.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/permutations.c b/tools/permutations.c index b280cc15b1..a0b041f2f2 100644 --- a/tools/permutations.c +++ b/tools/permutations.c @@ -80,8 +80,7 @@ void permute(struct graph_node *start) for (unsigned int i = 0; i < vector_active(start->to); i++) { struct graph_node *gn = vector_slot(start->to, i); struct cmd_token *tok = gn->data; - if (tok->attr == CMD_ATTR_HIDDEN - || tok->attr == CMD_ATTR_DEPRECATED) + if (tok->attr & CMD_ATTR_HIDDEN) continue; else if (tok->type == END_TKN || gn == start) { fprintf(stdout, " "); |
