Remove unnecessary check from qt_safe_pipe: condition can never happen

FD_CLOEXEC is implicit for us, so no caller will need to set O_CLOEXEC.

Change-Id: Ib056b47dde3341ef9a52ffff13efcb635dea95f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Thiago Macieira 2015-07-10 21:53:53 -07:00
parent 7331b15525
commit 61e621def3

View File

@ -179,11 +179,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07
// call qt_safe_pipe
static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
{
#ifdef O_CLOEXEC
Q_ASSERT((flags & ~(O_CLOEXEC | O_NONBLOCK)) == 0);
#else
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
#endif
int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)