]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Fix SA warning
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 20 Apr 2018 14:31:45 +0000 (10:31 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 24 Apr 2018 02:09:33 +0000 (22:09 -0400)
The addr value will never be null because of the way we do the
cli, but the SA system doesn't understand this.  Add an assert
to make it happy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/nexthop_group.c

index 5ac38d66853cc91a09aa4ebca1ff008c8ba00ad5..937b84bdddf6c5af6d671b41a2cf3e08d5eb523c 100644 (file)
@@ -387,6 +387,13 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd,
        struct nexthop *nh;
        bool legal;
 
+       /*
+        * This is impossible to happen as that the cli parser refuses
+        * to let you get here without an addr, but the SA system
+        * does not understand this intricacy
+        */
+       assert(addr);
+
        legal = nexthop_group_parse_nexthop(&nhop, addr, intf, name);
 
        if (nhop.type == NEXTHOP_TYPE_IPV6