aboutsummaryrefslogtreecommitdiff
path: root/slave.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-23 05:44:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-23 08:07:08 +0000
commitc779a5ec7deecf91cb9aca298af90cbc2d9c04d7 (patch)
tree0894ee40fb2f5db9013b8172e4b4ed4312a4edcc /slave.c
parentdon't use empty struct initializers (diff)
log: include 'fmt' in __VA_ARGS__
This ensures all calls have at least one __VA_ARGS__ argument, thus making them ISO C99 compliant.
Diffstat (limited to 'slave.c')
-rw-r--r--slave.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/slave.c b/slave.c
index b104a8d7..eaa21060 100644
--- a/slave.c
+++ b/slave.c
@@ -281,7 +281,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
sigprocmask(SIG_SETMASK, &mask, NULL) < 0)
{
const int _errno = errno;
- LOG_ERRNO_P("failed to restore signals", errno);
+ LOG_ERRNO_P(errno, "failed to restore signals");
(void)!write(fork_pipe[1], &_errno, sizeof(_errno));
_exit(_errno);
}
@@ -332,7 +332,8 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
return -1;
} else if (ret == sizeof(_errno)) {
LOG_ERRNO_P(
- "%s: failed to execute", _errno, argc == 0 ? conf_shell : argv[0]);
+ _errno, "%s: failed to execute",
+ argc == 0 ? conf_shell : argv[0]);
return -1;
} else
LOG_DBG("%s: successfully started", conf_shell);