lib: fix "reduce strcmp in CLI" fallout (10bac801)
In "lib/cli: reduce strcmp in CLI hot paths", I failed to notice that
CMD_VARIABLE as a boolean test covers a superset of the other types of
variables. Thus, the patch broke processing of IP/IPv6/Integer range
parameters in the CLI.
Fix by some reordering and introducing TERMINAL_RECORD macro (which
marks whether a given terminal type is a parameter) to be used in places
where the check is really for all kinds of variables.
Reported-by: Timo Teräs <timo.teras@iki.fi>
Tested-by: Martin Winter <mwinter@netdef.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 files changed