aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-compact.c
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2014-01-10 23:28:53 +0200
committerGravatar David Bremner <david@tethera.net>2014-01-18 14:45:26 -0400
commitc7453773064efbd0b2cd17b15ba483edbd28ce1e (patch)
tree00d526c4d671c4a793573fff423888d4b81beb05 /notmuch-compact.c
parent17e44cd584017c9187860e0dc80ea407940b8939 (diff)
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.
Diffstat (limited to 'notmuch-compact.c')
-rw-r--r--notmuch-compact.c6
1 files changed, 3 insertions, 3 deletions
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;
}