summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-17 10:01:21 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-17 10:52:07 (GMT)
commit213e2c937b667dba7e4996b0857ae5791c6d5fc8 (patch)
treeb8db403c4859966fa7a18fcf413a00cf8e3eecd4 /src/corelib
parent83940f25dba51a9942ab55ed8475fc7fc8a8da84 (diff)
downloadQt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.zip
Qt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.tar.gz
Qt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.tar.bz2
Fixed coverity warnings
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qiodevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 4108136..35b85c3 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -811,7 +811,7 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
#endif
if (readFromDevice < bytesToBuffer)
- d->buffer.truncate(readFromDevice < 0 ? 0 : int(readFromDevice));
+ d->buffer.truncate(int(readFromDevice));
if (!d->buffer.isEmpty()) {
lastReadChunkSize = d->buffer.read(data + readSoFar, maxSize - readSoFar);
readSoFar += lastReadChunkSize;