diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-09-19 14:14:58 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-09-28 01:28:52 +0200 |
commit | fa91bb9a025468aea6a912b30d619973b8da446e (patch) | |
tree | f8e81c13194543f3b99d7292d16b7be09a21024a /src/corelib/io | |
parent | 0c32af08a6d13b1db5bfedb248afc583c2fc22bc (diff) |
Don't check for EINTR after calling QT_READ / QT_WRITE
On Unix, those functions are already #define'd to qt_safe_read and
qt_safe_write, which do the necessary EINTR handling. On Windows, EINTR
cannot happen.
Change-Id: I50c46472c04bd90a0bac51c725cc86311ae905c8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 3269ee9f4c..674742fbf6 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -619,8 +619,7 @@ qint64 QFSFileEnginePrivate::readFdFh(char *data, qint64 len) #endif do { result = QT_READ(fd, data + readBytes, size_t(len - readBytes)); - } while ((result == -1 && errno == EINTR) - || (result > 0 && (readBytes += result) < len)); + } while (result > 0 && (readBytes += result) < len); eof = !(result == -1); } @@ -737,8 +736,7 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len) #endif do { result = QT_WRITE(fd, data + writtenBytes, size_t(len - writtenBytes)); - } while ((result == -1 && errno == EINTR) - || (result > 0 && (writtenBytes += result) < len)); + } while (result > 0 && (writtenBytes += result) < len); } if (len && writtenBytes == 0) { |