diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2018-08-23 12:24:19 +0200 |
---|---|---|
committer | Mohsin Kazmi <sykazmi@cisco.com> | 2018-08-23 12:24:19 +0200 |
commit | b24dfec57e7a272e2da4d99191340bbfbef19a45 (patch) | |
tree | 187b1df240d73db5ef54382e22102542ef68ad6d /src/vnet/l2/l2_api.c | |
parent | b749c21814f176ae6bcb4ce23432f11c542382c7 (diff) |
coverity: l2 arp termination dump
This patch resolves the coverity warning.
Change-Id: I3f5e664b442fa9bcafd28c67283596570dc1244d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_api.c')
-rw-r--r-- | src/vnet/l2/l2_api.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c index 5ec7581ff3b..39e52b1ecef 100644 --- a/src/vnet/l2/l2_api.c +++ b/src/vnet/l2/l2_api.c @@ -731,7 +731,7 @@ vl_api_bd_ip_mac_dump_t_handler (vl_api_bd_ip_mac_dump_t * mp) bd_main_t *bdm = &bd_main; l2_bridge_domain_t *bd_config; u32 bd_id = ntohl (mp->bd_id); - u32 bd_index, start = 1, end; + u32 bd_index, start, end; vl_api_registration_t *reg; uword *p; @@ -739,11 +739,12 @@ vl_api_bd_ip_mac_dump_t_handler (vl_api_bd_ip_mac_dump_t * mp) if (!reg) return; - end = vec_len (l2input_main.bd_configs); - /* see bd_id: ~0 means "any" */ if (bd_id == ~0) - bd_index = ~0; + { + start = 1; + end = vec_len (l2input_main.bd_configs); + } else { p = hash_get (bdm->bd_index_by_bd_id, bd_id); |