summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-04-22 14:33:58 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-04-22 14:33:58 +0000
commit118fc50730e8676134af996dc5bce7d9059bc9ce (patch)
tree324a0cd8a1423a0a64e06451a5e551403ce27396 /epan
parente55e144bc816cc4ae76451d9c51267eb69721962 (diff)
downloadwireshark-118fc50730e8676134af996dc5bce7d9059bc9ce.tar.gz
Don't assume that a proto_item is equivalent to a proto_tree.
Use the return value from proto_item_add_subtree(). svn path=/trunk/; revision=36809
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-wtp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index e92fe222bd..ce5184d396 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -265,7 +265,8 @@ wtp_handle_tpi(proto_tree *tree, tvbuff_t *tvb)
unsigned char tByte;
unsigned char tType;
unsigned char tLen;
- proto_item *subTree = NULL;
+ proto_tree *subTree = NULL;
+ proto_item *pi;
tByte = tvb_get_guint8(tvb, offset++);
tType = (tByte & 0x78) >> 3;
@@ -273,9 +274,9 @@ wtp_handle_tpi(proto_tree *tree, tvbuff_t *tvb)
tLen = tvb_get_guint8(tvb, offset++);
else
tLen = tByte & 0x03;
- subTree = proto_tree_add_uint(tree, hf_wtp_tpi_type,
+ pi = proto_tree_add_uint(tree, hf_wtp_tpi_type,
tvb, 0, tvb_length(tvb), tType);
- proto_item_add_subtree(subTree, ett_tpilist);
+ subTree = proto_item_add_subtree(pi, ett_tpilist);
switch (tType) {
case 0x00: /* Error*/
/* \todo */