diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-16 12:15:35 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-17 09:13:35 +0100 |
commit | 3c79f0b3ced903bbaaa41ad7feb698e3955e1f12 (patch) | |
tree | 1b79960a22003253347551719c7c9ef516fbb7c1 /src/id128 | |
parent | 06213aae94eeb59a7e343d2071c5e3c8def2f732 (diff) | |
download | systemd-3c79f0b3ced903bbaaa41ad7feb698e3955e1f12.tar.gz systemd-3c79f0b3ced903bbaaa41ad7feb698e3955e1f12.tar.bz2 systemd-3c79f0b3ced903bbaaa41ad7feb698e3955e1f12.zip |
id128: define main through macro
Diffstat (limited to 'src/id128')
-rw-r--r-- | src/id128/id128.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/id128/id128.c b/src/id128/id128.c index fe325042e0..6b7045b3e7 100644 --- a/src/id128/id128.c +++ b/src/id128/id128.c @@ -150,7 +150,7 @@ static int id128_main(int argc, char *argv[]) { return dispatch_verb(argc, argv, verbs, NULL); } -int main(int argc, char *argv[]) { +static int run(int argc, char *argv[]) { int r; log_parse_environment(); @@ -158,10 +158,9 @@ int main(int argc, char *argv[]) { r = parse_argv(argc, argv); if (r <= 0) - goto finish; + return r; - r = id128_main(argc, argv); - - finish: - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + return id128_main(argc, argv); } + +DEFINE_MAIN_FUNCTION(run); |