From: Francois Fleuret Date: Fri, 22 Mar 2013 17:24:20 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=ecf45088cdb6b6a3b02416063fe2aa591d997bdd;p=mymail.git Cosmetics. --- diff --git a/mymail.c b/mymail.c index 10d4428..c07e8a8 100644 --- a/mymail.c +++ b/mymail.c @@ -415,20 +415,21 @@ int search_in_db(const char *db_filename, struct search_condition *search_conditions, FILE *output_file) { - int hits[MAX_NB_SEARCH_CONDITIONS]; + FILE *db_file; char raw_db_line[BUFFER_SIZE]; char current_mail_filename[PATH_MAX + 1]; - unsigned long int current_position_in_mail; char mbox_key[TOKEN_BUFFER_SIZE]; char position_in_file_string[TOKEN_BUFFER_SIZE]; + unsigned long int current_position_in_mail; const char *mbox_value; int mbox_id; - int already_written, m, n; + int hits[MAX_NB_SEARCH_CONDITIONS]; int nb_body_conditions, need_time; - FILE *db_file; int nb_extracted_mails; time_t mail_time; + int m, n; + nb_extracted_mails = 0; if(!global_quiet) { @@ -457,7 +458,6 @@ int search_in_db(const char *db_filename, /* Then parse the said db file */ current_position_in_mail = 0; - already_written = 0; for(n = 0; n < nb_search_conditions; n++) { hits[n] = 0; } @@ -494,7 +494,6 @@ int search_in_db(const char *db_filename, mbox_value = parse_token(position_in_file_string, TOKEN_BUFFER_SIZE, ' ', mbox_value); mbox_value = parse_token(current_mail_filename, PATH_MAX+1, '\n', mbox_value); current_position_in_mail = atol(position_in_file_string); - already_written = 0; } else {