diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-04-27 13:57:41 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-04-27 14:06:22 +0200 |
commit | 617975d114f41116a15f81ecf6f6c57487fc2e82 (patch) | |
tree | 8426ed491d6c87d2ea903e943e8a30e995da71b8 /bgpd/bgp_bmp.c | |
parent | Merge pull request #11095 from ecbaldwin/unlock-node-always (diff) | |
download | frr-617975d114f41116a15f81ecf6f6c57487fc2e82.tar.xz frr-617975d114f41116a15f81ecf6f6c57487fc2e82.zip |
bgpd: Ensure pkt_afi and pkt_safi are not used uninited in some cases
The compiler is, rightly, pointing out that in some cases it is
possible that the pkt_afi and pkt_safi values are not properly
set and could result in a use before initialized. I do not
actually belive that this is possible, but let's make the compiler
happy.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_bmp.c')
-rw-r--r-- | bgpd/bgp_bmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 48d3706ec..47922985d 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -761,8 +761,8 @@ static void bmp_eor(struct bmp *bmp, afi_t afi, safi_t safi, uint8_t flags) struct peer *peer; struct listnode *node; struct stream *s, *s2; - iana_afi_t pkt_afi; - iana_safi_t pkt_safi; + iana_afi_t pkt_afi = IANA_AFI_IPV4; + iana_safi_t pkt_safi = IANA_SAFI_UNICAST; frrtrace(3, frr_bgp, bmp_eor, afi, safi, flags); |