From ccffc105b0b361150666f97b59ac72cff8466e9b Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 12 Jun 2017 12:50:43 +0200 Subject: Use defines for exit code values Make the usage of exit consist. That is use the pre defined exit values. Signed-off-by: Daniel Wagner Signed-off-by: David Oberhollenzer --- misc-utils/flash_unlock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'misc-utils') diff --git a/misc-utils/flash_unlock.c b/misc-utils/flash_unlock.c index 94f4761..5a3aac5 100644 --- a/misc-utils/flash_unlock.c +++ b/misc-utils/flash_unlock.c @@ -87,7 +87,7 @@ static void process_args(int argc, char *argv[]) switch (c) { case 'h': - usage(0); + usage(EXIT_SUCCESS); break; case 'i': req = REQUEST_ISLOCKED; @@ -105,14 +105,14 @@ static void process_args(int argc, char *argv[]) common_print_version(); exit(0); default: - usage(1); + usage(EXIT_FAILURE); break; } } if (req_set > 1) { errmsg("cannot specify more than one lock/unlock/islocked option"); - usage(1); + usage(EXIT_FAILURE); } arg_idx = optind; @@ -120,10 +120,10 @@ static void process_args(int argc, char *argv[]) /* Sanity checks */ if (argc - arg_idx < 1) { errmsg("too few arguments"); - usage(1); + usage(EXIT_FAILURE); } else if (argc - arg_idx > 3) { errmsg("too many arguments"); - usage(1); + usage(EXIT_FAILURE); } /* First non-option argument */ -- cgit v1.2.3