]> git.proxmox.com Git - mirror_frr.git/commit - lib/vty.h
lib: Changes to VTY string-parsing macros to remove warnings
authorAndrew Certain <certain@amazon.com>
Tue, 4 Dec 2012 21:33:24 +0000 (13:33 -0800)
committerScott Feldman <sfeldma@cumulusnetworks.com>
Mon, 7 Jan 2013 17:59:51 +0000 (09:59 -0800)
commit7798b6321cd0c6281b1a119ac894ff3749e88cc1
tree2be0e1ed9af8a9fdf156d013287c154cb081965a
parentf92c57f8ba4f1e856934ec1736be3cad62be4785
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>
lib/vty.h