#include <errno.h>
#include <getopt.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <systemd/sd-bus.h>
return command_dispatch(bus, commands, argc, argv);
}
-static int version(void) {
+static void version(void) {
printf("networkctl %s\n", PACKAGE_VERSION);
- return 0;
+ exit(0);
}
-static int help(void) {
+static void help(void) {
printf(
"%s [OPTIONS...] COMMAND\n\n"
"Options:\n"
program_invocation_short_name
);
- return 0;
+ exit(0);
}
static int parse_argv(int argc, char* argv[]) {
switch (c) {
case 'h':
- return help();
+ help();
case ARG_VERSION:
- return version();
+ version();
case '?':
return -EINVAL;