diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-05-09 18:55:29 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-05-09 17:48:23 +0000 |
commit | 89f0c5e7c874b1f3a794b540335baf48ebc70eb0 (patch) | |
tree | 7d90c7634667b8a077c62f219710907acb262d40 /epan | |
parent | 652f5ad17357f8d0cd1cb3f8a21bad2d5d3d30da (diff) |
ICMP: Fix Logically dead code (CID 1295678)
Mistake when remove proto_tree_add_text calls
Change-Id: I820264b7a90a2563f846b6e6472416cd3e3278a4
Reviewed-on: https://code.wireshark.org/review/8368
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-icmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index fcb504703b..934cff8a45 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -1181,9 +1181,9 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data) guint captured_length, reported_length; guint16 cksum, computed_cksum; const gchar *type_str, *code_str; - guint8 num_addrs = 0; - guint8 addr_entry_size = 0; - int i; + guint32 num_addrs = 0; + guint32 addr_entry_size = 0; + guint32 i; gboolean save_in_error_pkt; tvbuff_t *next_tvb; proto_item *item; @@ -1356,8 +1356,8 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data) break; case ICMP_RTRADVERT: - proto_tree_add_item(icmp_tree, hf_icmp_num_addrs, tvb, 4, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(icmp_tree, hf_icmp_addr_entry_size, tvb, 5, 1, ENC_BIG_ENDIAN); + proto_tree_add_item_ret_uint(icmp_tree, hf_icmp_num_addrs, tvb, 4, 1, ENC_BIG_ENDIAN, &num_addrs); + proto_tree_add_item_ret_uint(icmp_tree, hf_icmp_addr_entry_size, tvb, 5, 1, ENC_BIG_ENDIAN, &addr_entry_size); ti = proto_tree_add_item(icmp_tree, hf_icmp_lifetime, tvb, 6, 2, ENC_BIG_ENDIAN); proto_item_append_text(ti, " (%s)", time_secs_to_str(wmem_packet_scope(), tvb_get_ntohs(tvb, 6))); break; |