lib: Changes to VTY string-parsing macros to remove warnings
The VTY_GET_INTEGER_RANGE macro was being used also just to check the range
on a variable that wasn't used (for the "no" version of a VTY command), so I
split the macro into two. Also, since the variable is unsigned, if MIN is
zero, you get a warning about comparing an unsigned number against 0, giving
rise to slightly convoluted logic. Note that the previous two patches were
found by the -Wtype-limits and -Wunused-variables warnings. Without the
changes to these macros, these warnings are triggered erroneously, making it
harder to find the real problems.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
1 file changed