From 96a094ac06017ef55c085690cb24d655458dc2ba Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 2 Feb 2013 14:43:58 +0100 Subject: [PATCH] Cosmetics. --- mymail.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mymail.c b/mymail.c index eb329b1..4e16d2f 100644 --- a/mymail.c +++ b/mymail.c @@ -45,7 +45,7 @@ #include #define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file" -#define VERSION "0.1" +#define VERSION "0.9" #define MAX_NB_SEARCH_PATTERNS 10 @@ -572,13 +572,6 @@ int main(int argc, char **argv) { } } - if(!db_root_path) { - fprintf(stderr, - "mymail: db root path is not set\n"); - exit(EXIT_FAILURE); - } - - if(error) { print_usage(stderr); exit(EXIT_FAILURE); @@ -614,7 +607,7 @@ int main(int argc, char **argv) { } } - fprintf(db_file, "%s version_%s raw version\n", MYMAIL_DB_MAGIC_TOKEN, VERSION); + fprintf(db_file, "%s version_%s raw\n", MYMAIL_DB_MAGIC_TOKEN, VERSION); while(optind < argc) { recursive_index_mbox(db_file, @@ -632,6 +625,12 @@ int main(int argc, char **argv) { else { + if(!db_root_path) { + fprintf(stderr, + "mymail: db root path is not set\n"); + exit(EXIT_FAILURE); + } + if(nb_search_patterns > 0) { struct search_request search_requests[MAX_NB_SEARCH_PATTERNS]; char *search_regexp_string; -- 2.20.1