summaryrefslogtreecommitdiff
path: root/lib/nexthop_group.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-04-20 10:31:45 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-23 22:09:33 -0400
commitb51016ebb90ab19b28385732952ba1e5bcbcb7be (patch)
tree5e00bb7b33470cfe1c49ed215ea8b23791c354a6 /lib/nexthop_group.c
parent10a00758a76956be734353caf0a88205de51009f (diff)
lib: Fix SA warning
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>
Diffstat (limited to 'lib/nexthop_group.c')
-rw-r--r--lib/nexthop_group.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c
index 5ac38d6685..937b84bddd 100644
--- a/lib/nexthop_group.c
+++ b/lib/nexthop_group.c
@@ -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