]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-count.c
Merge tag '0.25.1'
[notmuch] / notmuch-count.c
index a05b430d77ac8df14db982cc533c87b7e4f40886..97281374b22252059fcbf65ff28d426615b2a632 100644 (file)
@@ -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;
     }