bgp: remove dead code (CID 1228878).

afi can take only one of the 2 above values, according to the
check at the beginning of the function.

Change-Id: I6652a5c64b4fbc8d2e907afb3b4f66d187ff9745
Reviewed-on: https://code.wireshark.org/review/17011
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2016-08-11 17:48:57 +02:00 committed by Michael Mann
parent 667a4fc118
commit f0befede8b
1 changed files with 2 additions and 4 deletions

View File

@ -2612,10 +2612,9 @@ decode_flowspec_nlri(proto_tree *tree, tvbuff_t *tvb, gint offset, guint16 afi,
if (afi == AFNUM_INET)
filter_len = decode_prefix4(filter_tree, pinfo, filter_item, hf_bgp_flowspec_nlri_dst_pref_ipv4,
tvb, offset+cursor_fspec, 0, "Destination IP filter");
else if (afi == AFNUM_INET6)
else /* AFNUM_INET6 */
filter_len = decode_fspec_match_prefix6(filter_tree, filter_item, hf_bgp_flowspec_nlri_dst_ipv6_pref,
tvb, offset+cursor_fspec, 0, pinfo);
else cursor_fspec = tot_flow_len;
if (filter_len == -1)
cursor_fspec= tot_flow_len;
break;
@ -2624,10 +2623,9 @@ decode_flowspec_nlri(proto_tree *tree, tvbuff_t *tvb, gint offset, guint16 afi,
if (afi == AFNUM_INET)
filter_len = decode_prefix4(filter_tree, pinfo, filter_item, hf_bgp_flowspec_nlri_src_pref_ipv4,
tvb, offset+cursor_fspec, 0, "Source IP filter");
else if (afi == AFNUM_INET6)
else /* AFNUM_INET6 */
filter_len = decode_fspec_match_prefix6(filter_tree, filter_item, hf_bgp_flowspec_nlri_src_ipv6_pref,
tvb, offset+cursor_fspec, 0, pinfo);
else cursor_fspec = tot_flow_len;
if (filter_len == -1)
cursor_fspec= tot_flow_len;
break;