diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-16 12:13:28 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-17 09:13:35 +0100 |
commit | 06213aae94eeb59a7e343d2071c5e3c8def2f732 (patch) | |
tree | 21a34efec376292c085d8ed9ece32feb0a337ce2 /src/hwdb | |
parent | hostnamectl: define main through macro (diff) | |
download | systemd-06213aae94eeb59a7e343d2071c5e3c8def2f732.tar.xz systemd-06213aae94eeb59a7e343d2071c5e3c8def2f732.zip |
hwdb: define main through macro
Diffstat (limited to 'src/hwdb')
-rw-r--r-- | src/hwdb/hwdb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c index be64a26d64..87b84b70a9 100644 --- a/src/hwdb/hwdb.c +++ b/src/hwdb/hwdb.c @@ -110,7 +110,7 @@ static int hwdb_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(); @@ -118,12 +118,11 @@ int main (int argc, char *argv[]) { r = parse_argv(argc, argv); if (r <= 0) - goto finish; + return r; mac_selinux_init(); - r = hwdb_main(argc, argv); - -finish: - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + return hwdb_main(argc, argv); } + +DEFINE_MAIN_FUNCTION(run); |