From 0a3350f63148d08c6b5fb14d82196738fc413da9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 18 Mar 2020 02:20:52 -0500 Subject: Fix WARN_ONLY (and the one caller feeding it in the field it was checking). --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.3