Simplify dissect_kafka_metadata_request() to not add an unnecessary tree and
authoreapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 20 Dec 2013 15:03:08 +0000 (15:03 +0000)
committereapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 20 Dec 2013 15:03:08 +0000 (15:03 +0000)
match the rest of the protocol dissection in style.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@54301 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-kafka.c

index 9e8373ae596e87b1eac1af1a8a859e7fcfbfb2f4..fce1fb856481cf889fa1001b471f420ba533aec2 100644 (file)
@@ -427,20 +427,9 @@ dissect_kafka_metadata_request_topic(tvbuff_t *tvb, packet_info *pinfo, proto_tr
 }
 
 static int
-dissect_kafka_metadata_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int start_offset)
+dissect_kafka_metadata_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
 {
-    proto_item *ti;
-    proto_tree *subtree;
-    int         offset = start_offset;
-
-    ti = proto_tree_add_text(tree, tvb, offset, -1, "Metadata Request");
-    subtree = proto_item_add_subtree(ti, ett_kafka_metadata_topics);
-
-    offset = dissect_kafka_array(subtree, tvb, pinfo, offset, &dissect_kafka_metadata_request_topic);
-
-    proto_item_set_len(ti, offset - start_offset);
-
-    return offset;
+    return dissect_kafka_array(tree, tvb, pinfo, offset, &dissect_kafka_metadata_request_topic);
 }
 
 /* METADATA RESPONSE */