diff options
author | Nick Hudson <nick.hudson@isode.com> | 2015-03-24 16:56:21 (GMT) |
---|---|---|
committer | Nick Hudson <nick.hudson@isode.com> | 2015-04-20 09:54:22 (GMT) |
commit | de8538282dfbb73212fa241638147a64bbe9cee5 (patch) | |
tree | 607e31d3fd0c7e92ce2bc6c74ab9ec42f161b341 /COPYING | |
parent | 4e52f24d7ca65b7274007ac3e5c0b6d9400d1bef (diff) | |
download | stroke-de8538282dfbb73212fa241638147a64bbe9cee5.zip stroke-de8538282dfbb73212fa241638147a64bbe9cee5.tar.bz2 |
Avoid potential double-adding of "lastConsumed" count to "bytesConsumed"
The code is currently doing
bytesConsumed += lastConsumed;
inside one of the clauses in a while loop, and then the same operation
again when the while loop exits. So there is a risk that the
"bytesConsumed" value will be too large.
In fact the only place the value of "bytesConsumed" is used is by some
code that checks whether it's greater than zero, so it would not be
problematic if the value were too large.
It seems worth fixing this in case future changes rely on the
"bytesConsumed" value being accurate.
Test-information:
inspection only
Change-Id: Ibd6fd01417afc4c4e030a5173bfba9a02980a757
signed-off-by:robert.williams@isode.com
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions