Merge pull request #6763 from donaldsharp/bgp_zebra_announce

bgpd: Remove memset from bgp_zebra_announce
This commit is contained in:
Mark Stapp 2020-07-17 15:59:03 -04:00 committed by GitHub
commit a0f6893193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1178,7 +1178,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
struct bgp_path_info *info, struct bgp *bgp, afi_t afi, struct bgp_path_info *info, struct bgp *bgp, afi_t afi,
safi_t safi) safi_t safi)
{ {
struct zapi_route api; struct zapi_route api = { 0 };
struct zapi_nexthop *api_nh; struct zapi_nexthop *api_nh;
int nh_family; int nh_family;
unsigned int valid_nh_count = 0; unsigned int valid_nh_count = 0;
@ -1224,7 +1224,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
nh_othervrf = 1; nh_othervrf = 1;
/* Make Zebra API structure. */ /* Make Zebra API structure. */
memset(&api, 0, sizeof(api));
api.vrf_id = bgp->vrf_id; api.vrf_id = bgp->vrf_id;
api.type = ZEBRA_ROUTE_BGP; api.type = ZEBRA_ROUTE_BGP;
api.safi = safi; api.safi = safi;