summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r--src/corelib/io/qfile.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index df470b9..728c316 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -1517,18 +1517,14 @@ qint64 QFile::readData(char *data, qint64 len)
if (!d->ensureFlushed())
return -1;
- qint64 ret = -1;
qint64 read = d->fileEngine->read(data, len);
- if (read != -1)
- ret = read;
-
- if(ret < 0) {
+ if(read < 0) {
QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::ReadError;
d->setError(err, d->fileEngine->errorString());
}
- return ret;
+ return read;
}
/*!