aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fc.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-05-14 01:47:41 +0000
committerBill Meier <wmeier@newsguy.com>2008-05-14 01:47:41 +0000
commit44af6ef887427d09d1f3e0465b964fd1c4395909 (patch)
treeb536e8eee183ff80de1e82a6513650d3c4892826 /epan/dissectors/packet-fc.c
parentcae5293711372f6a3a72517c122150242e983330 (diff)
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
Diffstat (limited to 'epan/dissectors/packet-fc.c')
-rw-r--r--epan/dissectors/packet-fc.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c
index 320411b669..ae6a2ad65d 100644
--- a/epan/dissectors/packet-fc.c
+++ b/epan/dissectors/packet-fc.c
@@ -624,7 +624,7 @@ static void
dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_ifcp)
{
/* Set up structures needed to add the protocol subtree and manage it */
- proto_item *ti=NULL;
+ proto_item *ti=NULL, *hidden_item;
proto_tree *fc_tree = NULL;
tvbuff_t *next_tvb;
int offset = 0, next_offset;
@@ -906,24 +906,27 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
fchdr.r_ctl & 0x0F);
break;
}
-
- proto_tree_add_uint_hidden (fc_tree, hf_fc_ftype, tvb, offset, 1,
- ftype);
+
+ hidden_item = proto_tree_add_uint (fc_tree, hf_fc_ftype, tvb, offset, 1,
+ ftype);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* XXX - use "fc_wka_vals[]" on this? */
proto_tree_add_string (fc_tree, hf_fc_did, tvb, offset+1, 3,
fc_to_str (fchdr.d_id.data));
- proto_tree_add_string_hidden (fc_tree, hf_fc_id, tvb, offset+1, 3,
- fc_to_str (fchdr.d_id.data));
+ hidden_item = proto_tree_add_string (fc_tree, hf_fc_id, tvb, offset+1, 3,
+ fc_to_str (fchdr.d_id.data));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint (fc_tree, hf_fc_csctl, tvb, offset+4, 1, fchdr.cs_ctl);
/* XXX - use "fc_wka_vals[]" on this? */
proto_tree_add_string (fc_tree, hf_fc_sid, tvb, offset+5, 3,
fc_to_str (fchdr.s_id.data));
- proto_tree_add_string_hidden (fc_tree, hf_fc_id, tvb, offset+5, 3,
- fc_to_str (fchdr.s_id.data));
-
+ hidden_item = proto_tree_add_string (fc_tree, hf_fc_id, tvb, offset+5, 3,
+ fc_to_str (fchdr.s_id.data));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
if (ftype == FC_FTYPE_LINKCTL) {
if (((fchdr.r_ctl & 0x0F) == FC_LCTL_FBSYB) ||
((fchdr.r_ctl & 0x0F) == FC_LCTL_FBSYL)) {
@@ -1127,17 +1130,19 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
tvb_set_child_real_data_tvbuff(tvb, next_tvb);
/* Add the defragmented data to the data source list. */
- add_new_data_source(pinfo, next_tvb, "Reassembled FC");
+ add_new_data_source(pinfo, next_tvb, "Reassembled FC");
- if (tree) {
- proto_tree_add_boolean_hidden (fc_tree, hf_fc_reassembled,
- tvb, offset+9, 1, 1);
- }
+ if (tree) {
+ hidden_item = proto_tree_add_boolean (fc_tree, hf_fc_reassembled,
+ tvb, offset+9, 1, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
}
else {
if (tree) {
- proto_tree_add_boolean_hidden (fc_tree, hf_fc_reassembled,
- tvb, offset+9, 1, 0);
+ hidden_item = proto_tree_add_boolean (fc_tree, hf_fc_reassembled,
+ tvb, offset+9, 1, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
next_tvb = tvb_new_subset (tvb, next_offset, -1, -1);
call_dissector (data_handle, next_tvb, pinfo, tree);
@@ -1146,8 +1151,9 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
}
} else {
if (tree) {
- proto_tree_add_boolean_hidden (fc_tree, hf_fc_reassembled,
- tvb, offset+9, 1, 0);
+ hidden_item = proto_tree_add_boolean (fc_tree, hf_fc_reassembled,
+ tvb, offset+9, 1, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
next_tvb = tvb_new_subset (tvb, next_offset, -1, -1);
}