aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi-mmc.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-07-08 14:47:17 -0400
committerMichael Mann <mmann78@netscape.net>2014-07-09 00:25:04 +0000
commit6691293a655645dcd98c9cb55618b8e41bef41a4 (patch)
tree495dccc6e708c0f22c129ccbe4dd495a1716f585 /epan/dissectors/packet-scsi-mmc.c
parentcfee2019c63f33cff3564c2266c9586c86b61baa (diff)
convert to proto_tree_add_subtree[_format]
Change-Id: I8d66b1bc7dbdfee3d4bf6fd3b3c21c6323b66f44 Reviewed-on: https://code.wireshark.org/review/2946 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-scsi-mmc.c')
-rw-r--r--epan/dissectors/packet-scsi-mmc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-scsi-mmc.c b/epan/dissectors/packet-scsi-mmc.c
index ccf86dff07..3c3f334660 100644
--- a/epan/dissectors/packet-scsi-mmc.c
+++ b/epan/dissectors/packet-scsi-mmc.c
@@ -429,15 +429,12 @@ dissect_mmc4_getconfiguration (tvbuff_t *tvb_a, packet_info *pinfo,
switch(feature){
case 0x0000: /* profile list */
while(try_offset<(old_offset+additional_length)){
- proto_item *it=NULL;
- proto_tree *tr=NULL;
+ proto_item *it;
+ proto_tree *tr;
guint16 profile;
guint8 cur_profile;
- if(tree){
- it=proto_tree_add_text(tree, try_tvb, try_offset, 4, "Profile:");
- tr=proto_item_add_subtree(it, ett_scsi_mmc_profile);
- }
+ tr=proto_tree_add_subtree(tree, try_tvb, try_offset, 4, ett_scsi_mmc_profile, &it, "Profile:");
profile=tvb_get_ntohs(try_tvb, try_offset);
proto_tree_add_item (tr, hf_scsi_mmc_feature_profile, try_tvb, try_offset, 2, ENC_BIG_ENDIAN);