Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/shared/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@ RC_UNUSED static int open_rwfifo(const char *path, bool nonblock)
* On linux, opening O_RDWR would solve this, but posix
* leaves that behaviour undefined, and for example, hurd
* does not properly handle it. */
if ((w = open(path, O_WRONLY | O_NONBLOCK | O_CLOEXEC) == -1)) {
if ((w = open(path, O_WRONLY | O_NONBLOCK | O_CLOEXEC)) == -1) {
err = errno;
goto r_err;
}

if (!nonblock) {
int flags = fcntl(r, F_GETFL);
if (flags == -1 || fcntl(r, flags & ~O_NONBLOCK) == -1) {
if (flags == -1 || fcntl(r, F_SETFL, flags & ~O_NONBLOCK) == -1) {
err = errno;
goto w_err;
}
Expand Down
Loading