diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2012-09-21 12:30:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-21 16:12:47 +0200 |
commit | 089d4a08d0cda5bae0bf9bb3273bfdb397200ee8 (patch) | |
tree | 230a9c3d1af59ba194604f691e4fc3c5089742dc /src/sysctl/sysctl.c | |
parent | d42c44fb6dd926271bfd56157114ba9d29935ea7 (diff) |
sysctl: fix error code handling
After if (r <= 0) r can't be 0 so
if (k < 0 && r == 0) never happens.
Diffstat (limited to 'src/sysctl/sysctl.c')
-rw-r--r-- | src/sysctl/sysctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 793796d363..62d4c81c47 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -260,6 +260,8 @@ int main(int argc, char *argv[]) { if (r <= 0) return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + r = 0; + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); |