X Tutup
Skip to content

Commit 8eb42d9

Browse files
poetteringkeszybz
authored andcommitted
sysctl: port to use DEFINE_MAIN_FUNCTION()
1 parent 6bc7a6a commit 8eb42d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sysctl/sysctl.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "fileio.h"
1515
#include "hashmap.h"
1616
#include "log.h"
17+
#include "main-func.h"
1718
#include "pager.h"
1819
#include "path-util.h"
1920
#include "string-util.h"
@@ -261,7 +262,7 @@ static int parse_argv(int argc, char *argv[]) {
261262
return 1;
262263
}
263264

264-
int main(int argc, char *argv[]) {
265+
static int run(int argc, char *argv[]) {
265266
OrderedHashmap *sysctl_options = NULL;
266267
int r = 0, k;
267268

@@ -323,5 +324,7 @@ int main(int argc, char *argv[]) {
323324
ordered_hashmap_free_free_free(sysctl_options);
324325
strv_free(arg_prefixes);
325326

326-
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
327+
return r;
327328
}
329+
330+
DEFINE_MAIN_FUNCTION(run);

0 commit comments

Comments
 (0)
X Tutup