]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix coverity warning
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 30 Jun 2021 19:37:33 +0000 (22:37 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 30 Jun 2021 19:37:33 +0000 (22:37 +0300)
`oly` is already dereferenced two lines earlier and is always passed to
the function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bgpd/bgp_evpn_vty.c

index 190323859f323c7d593cd5f7e781d30af1da6aa9..2bda5dbf9a962153af6e662e254bde978e48139a 100644 (file)
@@ -63,10 +63,8 @@ int argv_find_and_parse_oly_idx(struct cmd_token **argv, int argc, int *oly_idx,
                                enum overlay_index_type *oly)
 {
        *oly = OVERLAY_INDEX_TYPE_NONE;
-       if (argv_find(argv, argc, "gateway-ip", oly_idx)) {
-               if (oly)
-                       *oly = OVERLAY_INDEX_GATEWAY_IP;
-       }
+       if (argv_find(argv, argc, "gateway-ip", oly_idx))
+               *oly = OVERLAY_INDEX_GATEWAY_IP;
        return 1;
 }