From c7453773064efbd0b2cd17b15ba483edbd28ce1e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 10 Jan 2014 23:28:53 +0200 Subject: cli: clean up exit status code returned by the cli commands Apart from the status codes for format mismatches, the non-zero exit status codes have been arbitrary. Make the cli consistently return either EXIT_SUCCESS or EXIT_FAILURE. --- notmuch-compact.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'notmuch-compact.c') diff --git a/notmuch-compact.c b/notmuch-compact.c index 6c590938..2fc012a9 100644 --- a/notmuch-compact.c +++ b/notmuch-compact.c @@ -42,7 +42,7 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) opt_index = parse_arguments (argc, argv, options, 1); if (opt_index < 0) - return 1; + return EXIT_FAILURE; if (! quiet) printf ("Compacting database...\n"); @@ -50,7 +50,7 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) quiet ? NULL : status_update_cb, NULL); if (ret) { fprintf (stderr, "Compaction failed: %s\n", notmuch_status_to_string (ret)); - return 1; + return EXIT_FAILURE; } if (! quiet) { @@ -60,5 +60,5 @@ notmuch_compact_command (notmuch_config_t *config, int argc, char *argv[]) printf ("Done.\n"); } - return 0; + return EXIT_SUCCESS; } -- cgit v1.2.3