diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-12-12 18:43:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-21 19:09:28 +0100 |
commit | 57ab9f893031ec4ae205edc1c32742459a0f1289 (patch) | |
tree | b4e8e073e3cd0a8250f3e8c84ff4e6ff3f90699a /src/quotacheck | |
parent | util-lib: various improvements to kernel command line parsing (diff) | |
download | systemd-57ab9f893031ec4ae205edc1c32742459a0f1289.tar.xz systemd-57ab9f893031ec4ae205edc1c32742459a0f1289.zip |
qutoacheck,gpt-auto-generator: trivial coding style improvements
Diffstat (limited to 'src/quotacheck')
-rw-r--r-- | src/quotacheck/quotacheck.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c index 2495bcbefd..a42fce377e 100644 --- a/src/quotacheck/quotacheck.c +++ b/src/quotacheck/quotacheck.c @@ -107,9 +107,10 @@ int main(int argc, char *argv[]) { pid = fork(); if (pid < 0) { - log_error_errno(errno, "fork(): %m"); - return EXIT_FAILURE; - } else if (pid == 0) { + r = log_error_errno(errno, "fork(): %m"); + goto finish; + } + if (pid == 0) { /* Child */ @@ -123,5 +124,6 @@ int main(int argc, char *argv[]) { r = wait_for_terminate_and_warn("quotacheck", pid, true); +finish: return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } |