aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 2f47ac66..555fbd5e 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -380,7 +380,7 @@ int xcreate_stdio(char *path, int flags, int mode)
{
int fd = open(path, (flags^O_CLOEXEC)&~WARN_ONLY, mode);
- if (fd == -1) ((mode&WARN_ONLY) ? perror_msg_raw : perror_exit_raw)(path);
+ if (fd == -1) ((flags&WARN_ONLY) ? perror_msg_raw : perror_exit_raw)(path);
return fd;
}