summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-09-21 15:18:17 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-09-22 18:57:23 +0200
commit0d48e774c6361d91dff9bd65785b1043ef20ea25 (patch)
tree52087b3ef2c89e4b182d0440cee5d3a29f2201a7
parentbc5a1c6d3fc36d9d48c719895c2061e052ead17e (diff)
Refactor some loops over EINTR
QT_CLOSE is #defined to be qt_safe_close which already performs the EINTR loop. So there's no need of doing other loops (either by hand or by the EINTR_LOOP macro). Change-Id: Icca256124def5ab5d79c2ba101c6f889c85d19da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/io/qfsfileengine.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index e198cd6d75..bed77678fa 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -170,10 +170,7 @@ QFSFileEngine::~QFSFileEngine()
if (d->fh) {
fclose(d->fh);
} else if (d->fd != -1) {
- int ret;
- do {
- ret = QT_CLOSE(d->fd);
- } while (ret == -1 && errno == EINTR);
+ QT_CLOSE(d->fd);
}
}
QList<uchar*> keys = d->maps.keys();
@@ -378,7 +375,7 @@ bool QFSFileEnginePrivate::closeFdFh()
ret = fclose(fh);
} else {
// Close unbuffered file.
- EINTR_LOOP(ret, QT_CLOSE(fd));
+ ret = QT_CLOSE(fd);
}
// We must reset these guys regardless; calling close again after a