aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-s7comm.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-06-30 22:37:10 +0200
committerAnders Broman <a.broman58@gmail.com>2016-07-01 14:24:56 +0000
commitd4add25cb77773d9564dfc8f340ab5ce491a7d20 (patch)
tree88aa6b63cb60fb4b24908409df0c13ae678c9665 /epan/dissectors/packet-s7comm.c
parent250f248fd917eb556f6e6838cf9a45385e00e358 (diff)
s7comm: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I296d11ec43b3817d30920432239632f86b9f773f Reviewed-on: https://code.wireshark.org/review/16227 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Thomas Wiens <th.wiens@gmx.de> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-s7comm.c')
-rw-r--r--epan/dissectors/packet-s7comm.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/epan/dissectors/packet-s7comm.c b/epan/dissectors/packet-s7comm.c
index fd7b2684a7..2ab5e102a1 100644
--- a/epan/dissectors/packet-s7comm.c
+++ b/epan/dissectors/packet-s7comm.c
@@ -3728,18 +3728,14 @@ s7comm_decode_ud_ncprg_subfunc(tvbuff_t *tvb,
} else if (type == S7COMM_UD_TYPE_NCRES && subfunc == S7COMM_NCPRG_FUNCREQUESTDOWNLOAD) {
proto_tree_add_item(data_tree, hf_s7comm_data_ncprg_unackcount, tvb, offset, 1, ENC_NA);
offset += 1;
- dlength -= 1;
proto_tree_add_item(data_tree, hf_s7comm_data_blockcontrol_unknown1, tvb, offset, 1, ENC_NA);
offset += 1;
- dlength -= 1;
} else if (type == S7COMM_UD_TYPE_NCPUSH && (subfunc == S7COMM_NCPRG_FUNCCONTUPLOAD || subfunc == S7COMM_NCPRG_FUNCCONTDOWNLOAD)) {
proto_tree_add_item(data_tree, hf_s7comm_data_ncprg_unackcount, tvb, offset, 1, ENC_NA);
offset += 1;
- dlength -= 1;
/* Guess: If 1, then this is the last telegram of up/download, otherwise 0 */
proto_tree_add_item(data_tree, hf_s7comm_data_blockcontrol_unknown1, tvb, offset, 1, ENC_NA);
offset += 1;
- dlength -= 1;
} else {
/* There is always a 2 bytes header before the data.
* Guess: first byte is used as "data unit reference"