From 22f4096ca96acd504ac74e7dfad96f07edb6da51 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 31 Aug 2010 21:05:54 +0200 Subject: systemctl: rework exit codes for all utility programs to follow LSB or other standards --- src/notify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/notify.c') diff --git a/src/notify.c b/src/notify.c index 1c18c6bc08..28cfe23b23 100644 --- a/src/notify.c +++ b/src/notify.c @@ -131,13 +131,13 @@ int main(int argc, char* argv[]) { char* our_env[4], **final_env = NULL; unsigned i = 0; char *status = NULL, *cpid = NULL, *n = NULL; - int r, retval = 1; + int r, retval = EXIT_FAILURE; log_parse_environment(); log_open(); if ((r = parse_argv(argc, argv)) <= 0) { - retval = r < 0; + retval = r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; goto finish; } @@ -173,7 +173,7 @@ int main(int argc, char* argv[]) { } if (strv_length(final_env) <= 0) { - retval = 0; + retval = EXIT_SUCCESS; goto finish; } @@ -187,7 +187,7 @@ int main(int argc, char* argv[]) { goto finish; } - retval = r <= 0; + retval = r <= 0 ? EXIT_FAILURE : EXIT_SUCCESS; finish: free(status); -- cgit v1.2.3