]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Rework code to make SA happy
authorDonald Sharp <sharpd@nvidia.com>
Wed, 4 Nov 2020 16:48:49 +0000 (11:48 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 4 Nov 2020 16:48:49 +0000 (11:48 -0500)
commit9ea714e1436fad8b19253fe695ca5178e659b662
tree886603ab20c46be936121fdc5cce3b8926bac33d
parentfddbafcc9e7380259afd0c97f5332df44d81e112
zebra: Rework code to make SA happy

Clan SA was saying:

./zebra/zebra_vty_clippy.c: In function ‘show_route’:
zebra/zebra_vty.c:1775:4: warning: ‘zvrf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    do_show_ip_route_all(vty, zvrf, afi, !!fib, !!json, tag,
    ^

I do not see a way that zvrf could ever be uninited in the code path
but rearrange the code a tiny bit to make it happier.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/zebra_vty.c