diff options
author | Michael Mann <mmann78@netscape.net> | 2014-07-05 18:29:13 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-07-05 23:08:19 +0000 |
commit | 0335ae339d4004ea8ee9b087bac7e1803685accb (patch) | |
tree | 5404c6b0c626906b2192c53a4af6c511a711d287 /epan/dissectors/packet-xyplex.c | |
parent | 318205e6999314d4fb0e0272ca4db2d347501f98 (diff) |
convert to proto_tree_add_subtree[_format]
Change-Id: I66f0bffb987568c3d4c14a06bdc90465c877b27f
Reviewed-on: https://code.wireshark.org/review/2867
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-xyplex.c')
-rw-r--r-- | epan/dissectors/packet-xyplex.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-xyplex.c b/epan/dissectors/packet-xyplex.c index b2a6b7e7e3..9931e77af3 100644 --- a/epan/dissectors/packet-xyplex.c +++ b/epan/dissectors/packet-xyplex.c @@ -59,7 +59,7 @@ static const value_string xyplex_reg_vals[] = { static int dissect_xyplex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - proto_tree *xyplex_tree = NULL; + proto_tree *xyplex_tree; proto_item *ti; conversation_t *conversation; gint offset = 0; @@ -73,10 +73,8 @@ dissect_xyplex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ col_set_str(pinfo->cinfo, COL_PROTOCOL, "XYPLEX"); - if (tree) { - ti = proto_tree_add_item(tree, proto_xyplex, tvb, offset, -1, ENC_NA); - xyplex_tree = proto_item_add_subtree(ti, ett_xyplex); - } + ti = proto_tree_add_item(tree, proto_xyplex, tvb, offset, -1, ENC_NA); + xyplex_tree = proto_item_add_subtree(ti, ett_xyplex); if (pinfo->destport == UDP_PORT_XYPLEX) { /* This is a registration request from a Unix server |