]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Actually return the group peer
authorDonald Sharp <sharpd@nvidia.com>
Fri, 6 Nov 2020 01:42:03 +0000 (20:42 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 6 Nov 2020 01:44:31 +0000 (20:44 -0500)
The code is returning the group peer data structure, which
is what is happening but we should not have assignment statements
in this return statement for a `struct peer *` return.

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

index 096fd11d18837dff9c1ceb84d6183f4b39d92bd1..a15cb7cad3f7cc01e3445dac9ac9b18adf068a09 100644 (file)
@@ -6273,11 +6273,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy(
 static struct peer *bgp_peer_group_peer_lookup(struct bgp *bgp,
                                               const char *peer_str)
 {
-       struct peer *peer = NULL;
        struct peer_group *group = NULL;
 
        group = peer_group_lookup(bgp, peer_str);
-       return peer = group->conf;
+       return group->conf;
 }
 
 /*