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 --- nand-utils/nandtest.c | 6 +++--- nand-utils/nftl_format.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'nand-utils') diff --git a/nand-utils/nandtest.c b/nand-utils/nandtest.c index 5676733..9e39446 100644 --- a/nand-utils/nandtest.c +++ b/nand-utils/nandtest.c @@ -181,14 +181,14 @@ int main(int argc, char **argv) switch (c) { case 'h': - usage(0); + usage(EXIT_SUCCESS); break; case 'V': common_print_version(); exit(EXIT_SUCCESS); break; case '?': - usage(1); + usage(EXIT_FAILURE); break; case 'm': @@ -222,7 +222,7 @@ int main(int argc, char **argv) } } if (argc - optind != 1) - usage(1); + usage(EXIT_FAILURE); if (error) errmsg_die("Try --help for more information"); diff --git a/nand-utils/nftl_format.c b/nand-utils/nftl_format.c index a329c59..ea8199d 100644 --- a/nand-utils/nftl_format.c +++ b/nand-utils/nftl_format.c @@ -234,7 +234,7 @@ int main(int argc, char **argv) int idx = 0; if (argc < 2) - usage(1); + usage(EXIT_FAILURE); nftl = "NFTL"; @@ -249,13 +249,13 @@ int main(int argc, char **argv) break; case 'h': case '?': - usage(0); + usage(EXIT_SUCCESS); break; case 'V': display_version(); break; default: - usage(1); + usage(EXIT_FAILURE); break; } } -- cgit v1.2.3