From b51016ebb90ab19b28385732952ba1e5bcbcb7be Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 20 Apr 2018 10:31:45 -0400 Subject: [PATCH] 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 --- lib/nexthop_group.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.5