aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cnip.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-06-12 14:56:37 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-06-12 14:56:37 +0000
commit6de25d389797dd7860e46e7ab78bd5a8990115a9 (patch)
treeccdf537cd9620288ab40d454b63500f3f1c84f97 /epan/dissectors/packet-cnip.c
parent7a82d352801d4d7bb439e0d6854ccaaef3895b06 (diff)
simplify the subdissector call
svn path=/trunk/; revision=49904
Diffstat (limited to 'epan/dissectors/packet-cnip.c')
-rw-r--r--epan/dissectors/packet-cnip.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/epan/dissectors/packet-cnip.c b/epan/dissectors/packet-cnip.c
index 6fca2e4732..0133f4d72e 100644
--- a/epan/dissectors/packet-cnip.c
+++ b/epan/dissectors/packet-cnip.c
@@ -142,20 +142,16 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_set_len(ti, offset);
- if (type != DATA_PACKET) {
- expert_add_info_format_text(pinfo, cnip_tree, &ei_cnip_type_unknown,
- "This dissector doesn't yet decode packets of type %s (0x%x)",
- val_to_str_const(type, type_tuple, "Unknown"), type);
- }
-
next_tvb = tvb_new_subset_remaining(tvb, offset);
-
- /* Try subdissectors only for data packets*/
if (type == DATA_PACKET) {
if (dissector_try_uint(cnip_dissector_table, pf_pcode, next_tvb, pinfo, tree))
return;
}
-
+ else {
+ expert_add_info_format_text(pinfo, cnip_tree, &ei_cnip_type_unknown,
+ "This dissector doesn't yet decode packets of type %s (0x%x)",
+ val_to_str_const(type, type_tuple, "Unknown"), type);
+ }
call_dissector(data_handle, next_tvb, pinfo, tree);
}