X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=39f08c6ca94476757c5591c7a171c74c16875018;hp=77aa4338db27e2b3cdfceaff43e2233d3788bdd7;hb=59a9c36316293b161528097a73c72d5f5ed58781;hpb=53f8cc565126db4a003dbfc02850d2bf3b260636;ds=sidebyside diff --git a/notmuch-count.c b/notmuch-count.c index 77aa4338..39f08c6c 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -90,9 +90,9 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) fprintf (stderr, "Out of memory.\n"); return 1; } + if (*query_str == '\0') { - fprintf (stderr, "Error: notmuch count requires at least one count term.\n"); - return 1; + query_str = talloc_strdup (ctx, ""); } query = notmuch_query_create (notmuch, query_str);