X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=97281374b22252059fcbf65ff28d426615b2a632;hp=a05b430d77ac8df14db982cc533c87b7e4f40886;hb=1348212cb051b846bbe98f6d653da45aad3dfefa;hpb=33e58021958f8069ad46d7bd05cf586676fb6ae7 diff --git a/notmuch-count.c b/notmuch-count.c index a05b430d..97281374 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -111,7 +111,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str, case OUTPUT_FILES: count = count_files (query); if (count >= 0) { - printf ("%u", count); + printf ("%d", count); } else { ret = -1; goto DONE; @@ -204,6 +204,8 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[]) if (batch && opt_index != argc) { fprintf (stderr, "--batch and query string are not compatible\n"); + if (input) + fclose (input); return EXIT_FAILURE; }