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>
This commit is contained in:
parent
bc5a1c6d3f
commit
0d48e774c6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user