aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-06-15 15:15:48 +0000
committerBill Meier <wmeier@newsguy.com>2012-06-15 15:15:48 +0000
commita9690db5a3b5cd2c370fbe67563bed7a9cef1f74 (patch)
tree0b5522a0967d287f8dfeaabc6fc52f6341182244
parent665b95d15468761a577420593c017824d57f16c1 (diff)
Minor Changes:
- checkcol() not needed; - remove unneeded #include <expert.h> - remove 'if(tree)' so "bytes dissected" returned always the same. svn path=/trunk/; revision=43272
-rw-r--r--epan/dissectors/packet-mndp.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/epan/dissectors/packet-mndp.c b/epan/dissectors/packet-mndp.c
index 294bbeb2d2..07dac66446 100644
--- a/epan/dissectors/packet-mndp.c
+++ b/epan/dissectors/packet-mndp.c
@@ -39,7 +39,6 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/emem.h>
-#include <epan/expert.h>
/* protocol handles */
static int proto_mndp = -1;
@@ -220,32 +219,31 @@ static int
dissect_mndp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
- proto_tree *mndp_tree = NULL;
- guint32 offset = 0;
- guint32 packet_length;
+ proto_tree *mndp_tree;
+ guint32 offset = 0;
+ guint32 packet_length;
- if (check_col(pinfo->cinfo, COL_PROTOCOL))
- col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
packet_length = tvb_length(tvb);
- if (tree) {
- /* Header dissection */
- ti = proto_tree_add_item(tree, proto_mndp, tvb, offset, -1,
- ENC_NA);
- mndp_tree = proto_item_add_subtree(ti, ett_mndp);
-
- proto_tree_add_item(mndp_tree, hf_mndp_header_unknown, tvb, offset, 2,
- ENC_NA);
- offset += 2;
- proto_tree_add_item(mndp_tree, hf_mndp_header_seqno, tvb, offset, 2,
- ENC_BIG_ENDIAN);
- offset += 2;
-
- while (offset < packet_length)
- offset = dissect_tlv(tvb, pinfo, mndp_tree,
- offset, 0, mndp_body_tlv_vals);
+ /* Header dissection */
+ ti = proto_tree_add_item(tree, proto_mndp, tvb, offset, -1,
+ ENC_NA);
+ mndp_tree = proto_item_add_subtree(ti, ett_mndp);
+
+ proto_tree_add_item(mndp_tree, hf_mndp_header_unknown, tvb, offset, 2,
+ ENC_NA);
+ offset += 2;
+ proto_tree_add_item(mndp_tree, hf_mndp_header_seqno, tvb, offset, 2,
+ ENC_BIG_ENDIAN);
+ offset += 2;
+
+ while (offset < packet_length) {
+ offset = dissect_tlv(tvb, pinfo, mndp_tree,
+ offset, 0, mndp_body_tlv_vals);
}
+
return offset;
}
@@ -363,7 +361,6 @@ proto_reg_handoff_mndp(void)
{
dissector_handle_t mndp_handle;
-
mndp_handle = new_create_dissector_handle(dissect_mndp_static, proto_mndp);
dissector_add_uint("udp.port", PORT_MNDP, mndp_handle);
/* heur_dissector_add("udp", dissect_mndp_heur, proto_mndp); */