From d3a435e53c94ec25b4ae5fa2614f49ef8884e08a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 5 Jan 2016 22:26:58 -0600 Subject: Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts. --- lib/xwrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/xwrap.c') diff --git a/lib/xwrap.c b/lib/xwrap.c index 6d0c5113..09f9197d 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -214,7 +214,7 @@ pid_t xpopen_both(char **argv, int *pipes) // setting high bit of argv[0][0] to let new process know **toys.argv |= 0x80; execv(s, toys.argv); - perror_msg(s); + perror_msg_raw(s); _exit(127); } @@ -291,7 +291,7 @@ void xunlink(char *path) int xcreate(char *path, int flags, int mode) { int fd = open(path, flags^O_CLOEXEC, mode); - if (fd == -1) perror_exit("%s", path); + if (fd == -1) perror_exit_raw(path); return fd; } -- cgit v1.2.3