summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 79a46b8cd5..3810033fb2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -117,10 +117,10 @@ _noreturn_ static void crash(int sig) {
_exit(1);
} else {
- int status, r;
+ int status;
/* Order things nicely. */
- if ((r = waitpid(pid, &status, 0)) < 0)
+ if (waitpid(pid, &status, 0) < 0)
log_error("Caught <%s>, waitpid() failed: %s", signal_to_string(sig), strerror(errno));
else if (!WCOREDUMP(status))
log_error("Caught <%s>, core dump failed.", signal_to_string(sig));
@@ -540,7 +540,7 @@ static int parse_proc_cmdline(void) {
char *state;
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
- log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(errno));
+ log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return 0;
}