From e27759aa56732ec1423a104333c1d88f5ddd7efb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 17 May 2024 17:00:51 +0200 Subject: Adding upstream version 4.2.5. Signed-off-by: Daniel Baumann --- epan/dissectors/packet-epl.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'epan/dissectors/packet-epl.c') diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 4dbc5156..4dcd4195 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -3870,18 +3870,15 @@ dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_item(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_segmentation, tvb, offset, 1, ENC_LITTLE_ENDIAN); - if (segment_size != 0) - { - offset += 1; - proto_tree_add_item(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_command_id, tvb, offset, 1, ENC_LITTLE_ENDIAN); - offset += 1; + offset += 1; + proto_tree_add_item(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_command_id, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; - item = proto_tree_add_item(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_segment_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); - offset += 4; - if ( tvb_reported_length_remaining(tvb, offset) < segment_size ) - expert_add_info_format(pinfo, item, &ei_real_length_differs, - "Captured length differs, only %d octets will be displayed", tvb_reported_length_remaining(tvb, offset) - 4 ); - } + item = proto_tree_add_item(sdo_cmd_tree, hf_epl_asnd_sdo_cmd_segment_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 4; + if ( tvb_reported_length_remaining(tvb, offset) < segment_size ) + expert_add_info_format(pinfo, item, &ei_real_length_differs, + "Captured length differs, only %d octets will be displayed", tvb_reported_length_remaining(tvb, offset) - 4 ); if (segmented == EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER) { -- cgit v1.2.3