diff options
author | Michael Mann <mmann78@netscape.net> | 2014-07-01 18:31:05 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-07-04 16:59:14 +0000 |
commit | c7a6e6fa130611941a5d05e7646d7c38d78b2d0a (patch) | |
tree | 435964d38acd7196e6d6aa58be80e44634ebfa9c /epan/dissectors/packet-mount.c | |
parent | 93517043e96c26a1d3dad49c2f57b345e3bbbba0 (diff) |
convert to proto_tree_add_subtree[_format]
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc
Reviewed-on: https://code.wireshark.org/review/2852
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mount.c')
-rw-r--r-- | epan/dissectors/packet-mount.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/dissectors/packet-mount.c b/epan/dissectors/packet-mount.c index a535d8056b..b34e40de22 100644 --- a/epan/dissectors/packet-mount.c +++ b/epan/dissectors/packet-mount.c @@ -209,18 +209,16 @@ dissect_mount1_mnt_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr static int dissect_mountlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) { - proto_item* lock_item = NULL; - proto_tree* lock_tree = NULL; + proto_item* lock_item; + proto_tree* lock_tree; int old_offset = offset; const char* hostname; const char* directory; - if (tree) { - lock_item = proto_tree_add_item(tree, hf_mount_mountlist, tvb, + lock_item = proto_tree_add_item(tree, hf_mount_mountlist, tvb, offset, -1, ENC_NA); - if (lock_item) - lock_tree = proto_item_add_subtree(lock_item, ett_mount_mountlist); - } + + lock_tree = proto_item_add_subtree(lock_item, ett_mount_mountlist); offset = dissect_rpc_string(tvb, lock_tree, hf_mount_mountlist_hostname, offset, &hostname); @@ -306,8 +304,7 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr if (tree) { groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, tvb, offset, -1, ENC_NA); - if (groups_item) - groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups); + groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups); } offset = dissect_rpc_list(tvb, pinfo, groups_tree, offset, |