diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-09-27 13:26:56 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-10-06 16:37:41 +0000 |
commit | 9684e16f002f4f813c49141de2933a7fb0c71461 (patch) | |
tree | 0eba85b736ce1b6a615245cf1a3eef136ecebf1f /src/corelib | |
parent | da5b8bfe4647f4a0494e7dd2e08d6652f72803f0 (diff) |
QUtf8Codec: Remove dead code
The maximum value for charsNeeded is 4, so if bytesAvailable is less
than charsNeeded - 1, the it's at most 2. It can't be larger than 2.
Found by Coverity, CID 11000.
Change-Id: I42e7ef1a481840699a8dffff1407ef9221a4fd80
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qutfcodec_p.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h index 99887352c9..d97145c6fc 100644 --- a/src/corelib/codecs/qutfcodec_p.h +++ b/src/corelib/codecs/qutfcodec_p.h @@ -217,8 +217,6 @@ namespace QUtf8Functions return Traits::Error; if (bytesAvailable > 1 && !isContinuationByte(Traits::peekByte(src, 1))) return Traits::Error; - if (bytesAvailable > 2 && !isContinuationByte(Traits::peekByte(src, 2))) - return Traits::Error; return Traits::EndOfString; } |