diff options
author | Gerald Combs <gerald@wireshark.org> | 2019-04-03 14:32:30 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-04-04 04:03:38 +0000 |
commit | 8d3ac3af866ecc7b847dd5b621d828872fe9ba18 (patch) | |
tree | 3fa7aa1a57e1b828f636829f08d1adb9dfb5b395 /epan/dissectors/packet-slsk.c | |
parent | bdf26a35f696a1524364945a2c868e57c97d1729 (diff) |
epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.
Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-slsk.c')
-rw-r--r-- | epan/dissectors/packet-slsk.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c index f5876fe5f5..087d436b96 100644 --- a/epan/dissectors/packet-slsk.c +++ b/epan/dissectors/packet-slsk.c @@ -466,13 +466,13 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *ti2 = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); proto_tree *slsk_compr_packet_tree = proto_item_add_subtree(ti2, ett_slsk_compr_packet); - PROTO_ITEM_SET_GENERATED(ti2); + proto_item_set_generated(ti2); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); uncomprlen = tvb_reported_length_remaining(uncompr_tvb, 0); ti = proto_tree_add_uint(slsk_tree, hf_slsk_uncompressed_packet_length, tvb, offset, 0, uncomprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); add_new_data_source(pinfo, uncompr_tvb, "Uncompressed SoulSeek data"); uncompr_tvb_offset = 0; @@ -528,9 +528,9 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } }else { ti = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); offset += tvb_captured_length_remaining(tvb, offset); } } @@ -573,20 +573,20 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (uncompr_tvb == NULL) { ti = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); offset += tvb_captured_length_remaining(tvb, offset); expert_add_info(pinfo, ti, &ei_slsk_decompression_failed); } else { proto_item *ti2 = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); proto_tree *slsk_compr_packet_tree = proto_item_add_subtree(ti2, ett_slsk_compr_packet); - PROTO_ITEM_SET_GENERATED(ti2); + proto_item_set_generated(ti2); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); uncomprlen = tvb_captured_length_remaining(uncompr_tvb, 0); ti = proto_tree_add_uint(slsk_tree, hf_slsk_uncompressed_packet_length, tvb, offset, 0, uncomprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); add_new_data_source(pinfo, uncompr_tvb, "Uncompressed SoulSeek data"); uncompr_tvb_offset = 0; @@ -639,9 +639,9 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } }else { ti = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); offset += tvb_captured_length_remaining(tvb, offset); } } @@ -1033,13 +1033,13 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *ti2 = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); proto_tree *slsk_compr_packet_tree = proto_item_add_subtree(ti2, ett_slsk_compr_packet); - PROTO_ITEM_SET_GENERATED(ti2); + proto_item_set_generated(ti2); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); uncomprlen = tvb_captured_length_remaining(uncompr_tvb, 0); ti = proto_tree_add_uint(slsk_tree, hf_slsk_uncompressed_packet_length, tvb, offset, 0, uncomprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); add_new_data_source(pinfo, uncompr_tvb, "Uncompressed SoulSeek data"); uncompr_tvb_offset = 0; @@ -1102,9 +1102,9 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } }else { ti = proto_tree_add_item(slsk_tree, hf_slsk_compr_packet, tvb, offset, -1, ENC_NA); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); ti = proto_tree_add_uint(slsk_tree, hf_slsk_compressed_packet_length, tvb, offset, 0, comprlen); - PROTO_ITEM_SET_GENERATED(ti); + proto_item_set_generated(ti); offset += tvb_captured_length_remaining(tvb, offset); } } |