aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-llrp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-03-19 19:31:02 +0100
committerAnders Broman <a.broman58@gmail.com>2017-03-20 05:06:34 +0000
commit2fd8c1778afff80794742c636b1094eae34d671e (patch)
tree10208556ef977caab3124c93c1e61e1d7ae075b6 /epan/dissectors/packet-llrp.c
parent66dc0aecab655d64a02d34209b73016988b6faa5 (diff)
Replace PARAM_TREE_ADD_SPEC_STAY macro by proto_tree_add...
(Make checkhf more happy) Change-Id: I27ff7d9ba1351bdc7dc1b801950ffdfaf3266629 Reviewed-on: https://code.wireshark.org/review/20634 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-llrp.c')
-rw-r--r--epan/dissectors/packet-llrp.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/epan/dissectors/packet-llrp.c b/epan/dissectors/packet-llrp.c
index 22aac2a11f..1abfce57ae 100644
--- a/epan/dissectors/packet-llrp.c
+++ b/epan/dissectors/packet-llrp.c
@@ -1505,14 +1505,6 @@ static guint dissect_llrp_item_array(tvbuff_t * const tvb, packet_info *pinfo,
PARAM_TREE_ADD_STAY(hfindex, length, flag); \
suboffset += length
-#define PARAM_TREE_ADD_SPEC_STAY(type, hfindex, length, number, string) \
- proto_tree_add_##type(param_tree, hf_llrp_##hfindex, tvb, \
- suboffset, length, number, string, number)
-
-#define PARAM_TREE_ADD_SPEC(type, hfindex, length, number, string) \
- PARAM_TREE_ADD_SPEC_STAY(type, hfindex, length, number, string); \
- suboffset += length
-
static guint
dissect_llrp_impinj_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *param_tree,
guint suboffset, const guint param_end)
@@ -1832,31 +1824,31 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
PARAM_TREE_ADD(client_opspec_timeout, 2, ENC_BIG_ENDIAN);
num = tvb_get_ntohl(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_rospec, 4, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_rospec, tvb, suboffset, 4, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_rospec, 4, ENC_BIG_ENDIAN);
suboffset += 4;
num = tvb_get_ntohl(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_spec_per_rospec, 4, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_spec_per_rospec, tvb, suboffset, 4, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_spec_per_rospec, 4, ENC_BIG_ENDIAN);
suboffset += 4;
num = tvb_get_ntohl(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_inventory_per_aispec, 4, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_inventory_per_aispec, tvb, suboffset, 4, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_inventory_per_aispec, 4, ENC_BIG_ENDIAN);
suboffset += 4;
num = tvb_get_ntohl(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_accessspec, 4, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_accessspec, tvb, suboffset, 4, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_accessspec, 4, ENC_BIG_ENDIAN);
suboffset += 4;
num = tvb_get_ntohl(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_opspec_per_accressspec, 4, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_opspec_per_accressspec, tvb, suboffset, 4, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_opspec_per_accressspec, 4, ENC_BIG_ENDIAN);
suboffset += 4;
@@ -2114,7 +2106,7 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
PARAM_TREE_ADD(can_support_XPC, 1, ENC_NA);
num = tvb_get_ntohs(tvb, suboffset);
if(num == LLRP_NO_LIMIT)
- PARAM_TREE_ADD_SPEC_STAY(uint_format_value, max_num_filter_per_query, 2, num, "No limit (%u)");
+ proto_tree_add_uint_format_value(param_tree, hf_llrp_max_num_spec_per_rospec, tvb, suboffset, 2, num, "No limit (%u)", num);
else
PARAM_TREE_ADD_STAY(max_num_filter_per_query, 2, ENC_BIG_ENDIAN);
suboffset += 2;
@@ -2410,8 +2402,6 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#undef PARAM_TREE_ADD_STAY
#undef PARAM_TREE_ADD
-#undef PARAM_TREE_ADD_SPEC_STAY
-#undef PARAM_TREE_ADD_SPEC
static guint
dissect_llrp_impinj_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)