summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_open.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-28 12:41:52 +0200
committerpaco <paco@voltanet.io>2018-06-28 12:41:52 +0200
commitda3b87f8b0dc12bac2834471e7fa669220447443 (patch)
tree6f137ae928777850220477153cd6d3d15b7bc9ff /bgpd/bgp_open.c
parentMerge pull request #2556 from pacovn/Coverity_1465491_Untrusted_value_as_argu... (diff)
downloadfrr-da3b87f8b0dc12bac2834471e7fa669220447443.tar.xz
frr-da3b87f8b0dc12bac2834471e7fa669220447443.zip
bgpd: return value (Coverity 1399203)
The return value can be ignored because in case of error both the 'afi' and 'safi' variables are set to the invalid values (AFI_MAX, SAFI_MAX), and the invalid values are handled properly afterwards in the 'default' blocks. Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r--bgpd/bgp_open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index aa98f8a55..da90bbd67 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -80,8 +80,9 @@ void bgp_capability_vty_out(struct vty *vty, struct peer *peer,
afi_t afi;
safi_t safi;
- bgp_map_afi_safi_iana2int(ntohs(mpc.afi), mpc.safi,
- &afi, &safi);
+ (void)bgp_map_afi_safi_iana2int(ntohs(mpc.afi),
+ mpc.safi, &afi, &safi);
+
if (use_json) {
switch (afi) {
case AFI_IP: