Skip to content

Commit e5dd540

Browse files
N-R-Knavi-desu
authored andcommitted
shared: fix fcntl argument order
how this managed to survive my tests is beyond me... fixes: b6db877
1 parent c2e5247 commit e5dd540

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/shared/helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ RC_UNUSED static char *env_findvar(const char *name, char **envp)
288288
RC_UNUSED static int xopen_nonblock(const char *filename, int flags, mode_t mode)
289289
{
290290
int fd = open(filename, flags | O_NONBLOCK, mode);
291-
if (fd >= 0 && fcntl(F_SETFL, fd, flags & ~O_NONBLOCK) < 0) {
291+
if (fd >= 0 && fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) < 0) {
292292
int saved_errno = errno;
293293
close(fd);
294294
fd = -1;

0 commit comments

Comments
 (0)