summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-11 22:04:22 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-11 22:04:25 +0200
commite364ad0628b5930a671ae5be863b960f4bd748a8 (patch)
tree1427ac128d3530f696e49b6f5e482488399c9b6e /src/main.c
parent10f8e83cbb10c73b980c9b3b895ac044e600ba0c (diff)
clang: fix numerous little issues found with clang-analyzer
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;
}