From 188aa9a80eea47842988f1b860931d25e1ca08bd Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 22 Jun 2014 16:01:36 -0400 Subject: convert to proto_tree_add_subtree[_format] Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df Reviewed-on: https://code.wireshark.org/review/2560 Tested-by: Michael Mann Reviewed-by: Michael Mann --- epan/dissectors/packet-batadv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-batadv.c') diff --git a/epan/dissectors/packet-batadv.c b/epan/dissectors/packet-batadv.c index 3a6b5ae13f..d871030d59 100644 --- a/epan/dissectors/packet-batadv.c +++ b/epan/dissectors/packet-batadv.c @@ -1744,16 +1744,15 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree static void dissect_batadv_icmp_rr(proto_tree *batadv_icmp_tree, tvbuff_t *tvb, int offset) { - proto_tree *field_tree = NULL; - proto_item *tf; + proto_tree *field_tree; int ptr, i; ptr = tvb_get_guint8(tvb, offset); if (ptr < 1 || ptr > BAT_RR_LEN) return; - tf = proto_tree_add_text(batadv_icmp_tree, tvb, offset, 1+ 6 * BAT_RR_LEN, "ICMP RR"); - field_tree = proto_item_add_subtree(tf, ett_batadv_icmp_rr); + field_tree = proto_tree_add_subtree(batadv_icmp_tree, tvb, offset, 1+ 6 * BAT_RR_LEN, + ett_batadv_icmp_rr, NULL, "ICMP RR"); proto_tree_add_text(field_tree, tvb, offset, 1, "Pointer: %d", ptr); ptr--; -- cgit v1.2.3