From 61e621def380f28183b6ce7047e9a88a49f81f82 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 10 Jul 2015 21:53:53 -0700 Subject: 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 --- src/corelib/kernel/qcore_unix_p.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index fa083a3f44..ce8d9f6d65 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -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) -- cgit v1.2.3