diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-03-10 18:56:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-03-10 18:56:56 +0100 |
commit | d9dde2bb03fd2d3b71365909eaa5d0179e2fba86 (patch) | |
tree | 26a473d5d2fd7915e64cd57cc9ac427a0c93f352 /src/machine-id-commit/machine-id-commit.c | |
parent | f85ef957e647c5182acf5e64298f68e4b7fbfe8f (diff) |
machine-id-commit: simplifications
Diffstat (limited to 'src/machine-id-commit/machine-id-commit.c')
-rw-r--r-- | src/machine-id-commit/machine-id-commit.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/machine-id-commit/machine-id-commit.c b/src/machine-id-commit/machine-id-commit.c index d9c1b7c7a9..0f7748e453 100644 --- a/src/machine-id-commit/machine-id-commit.c +++ b/src/machine-id-commit/machine-id-commit.c @@ -28,7 +28,7 @@ #include "log.h" #include "build.h" -static const char *arg_root = ""; +static const char *arg_root = NULL; static void help(void) { printf("%s [OPTIONS...]\n\n" @@ -98,7 +98,10 @@ int main(int argc, char *argv[]) { r = parse_argv(argc, argv); if (r <= 0) - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + goto finish; - return machine_id_commit(arg_root) < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + r = machine_id_commit(arg_root); + +finish: + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } |