aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-06-03 15:15:39 +0200
committerMichael Mann <mmann78@netscape.net>2017-06-04 12:22:10 +0000
commit55d0adf6892d03eacd26b4136152bb25f2a83036 (patch)
treee4207323a861076ddec0e25207f47986f4dbf72d /plugins
parent9ba786fba33279ad88828c22d0a332ffe6768866 (diff)
profinet dcp: simplify dissect_PNDCP_Suboption_Manuf()
There's not much point in having a switch-case block with only a default statement ;-) Change-Id: Iaacd87bb2995783b98e5395b3654a1c8f32c473a Reviewed-on: https://code.wireshark.org/review/21938 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/profinet/packet-pn-dcp.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/profinet/packet-pn-dcp.c b/plugins/profinet/packet-pn-dcp.c
index 11900b1..75c47e0 100644
--- a/plugins/profinet/packet-pn-dcp.c
+++ b/plugins/profinet/packet-pn-dcp.c
@@ -951,19 +951,14 @@ dissect_PNDCP_Suboption_Manuf(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
guint8 service_id _U_, gboolean is_response _U_)
{
- guint8 suboption;
guint16 block_length;
-
- offset = dissect_pn_uint8( tvb, offset, pinfo, tree, hf_pn_dcp_suboption_manuf, &suboption);
+ offset = dissect_pn_uint8( tvb, offset, pinfo, tree, hf_pn_dcp_suboption_manuf, NULL);
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_length, &block_length);
- switch (suboption) {
- default:
- pn_append_info(pinfo, dcp_item, ", Manufacturer Specific");
- proto_item_append_text(block_item, "Manufacturer Specific");
- offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, block_length);
- }
+ pn_append_info(pinfo, dcp_item, ", Manufacturer Specific");
+ proto_item_append_text(block_item, "Manufacturer Specific");
+ offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, block_length);
return offset;
}