]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Tell Coverity SA that regex cannot be NULL here
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 31 Jan 2020 15:26:33 +0000 (10:26 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 4 Feb 2020 13:09:15 +0000 (08:09 -0500)
The coverity SA believes that the regex value can possibly
be NULL.  Not possible so let's make it happy.

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

index 78f03a707dc6d24579544b112f76231ec2cc05c9..d3a5774570b79695b4914ebd4ab0ae5d3696cede 100644 (file)
@@ -10708,6 +10708,7 @@ DEFUN (show_ip_bgp_regexp,
        if (argv_find(argv, argc, "REGEX", &idx))
                regstr = argv[idx]->arg;
 
+       assert(regstr);
        return bgp_show_regexp(vty, bgp, (const char *)regstr, afi, safi,
                                 bgp_show_type_regexp, uj);
 }