aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pgm.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-pgm.c
parentcae5293711372f6a3a72517c122150242e983330 (diff)
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
Diffstat (limited to 'epan/dissectors/packet-pgm.c')
-rw-r--r--epan/dissectors/packet-pgm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c
index 10fb58b1df..9d744240dc 100644
--- a/epan/dissectors/packet-pgm.c
+++ b/epan/dissectors/packet-pgm.c
@@ -882,7 +882,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *pgm_tree = NULL;
proto_tree *opt_tree = NULL;
proto_tree *type_tree = NULL;
- proto_item *tf;
+ proto_item *tf, *hidden_item;
ptvcursor_t* cursor;
ti = proto_tree_add_protocol_format(tree, proto_pgm,
@@ -895,8 +895,10 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cursor = ptvcursor_new(pgm_tree, tvb, 0);
- proto_tree_add_item_hidden(pgm_tree, hf_pgm_port, tvb, 0, 2, FALSE);
- proto_tree_add_item_hidden(pgm_tree, hf_pgm_port, tvb, 2, 2, FALSE);
+ hidden_item = proto_tree_add_item(pgm_tree, hf_pgm_port, tvb, 0, 2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_item(pgm_tree, hf_pgm_port, tvb, 2, 2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
ptvcursor_add(cursor, hf_pgm_main_sport, 2, FALSE);
ptvcursor_add(cursor, hf_pgm_main_dport, 2, FALSE);
ptvcursor_add(cursor, hf_pgm_main_type, 1, FALSE);
@@ -933,8 +935,9 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_format(pgm_tree, hf_pgm_main_cksum, tvb,
ptvcursor_current_offset(cursor), 2, pgmhdr_cksum, "Checksum: 0x%04x [correct]", pgmhdr_cksum);
} else {
- proto_tree_add_boolean_hidden(pgm_tree, hf_pgm_main_cksum_bad, tvb,
+ hidden_item = proto_tree_add_boolean(pgm_tree, hf_pgm_main_cksum_bad, tvb,
ptvcursor_current_offset(cursor), 2, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint_format(pgm_tree, hf_pgm_main_cksum, tvb,
ptvcursor_current_offset(cursor), 2, pgmhdr_cksum, "Checksum: 0x%04x [incorrect, should be 0x%04x]",
pgmhdr_cksum, in_cksum_shouldbe(pgmhdr_cksum, computed_cksum));