X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=0d9046a8a20835f910ed4ac0dc8447f0e67df069;hp=e8c545e3a1ff9de57407d1c832373fec937e0436;hb=HEAD;hpb=d447b694b498c3e18a22f1eb15139a798c6aab26 diff --git a/notmuch-count.c b/notmuch-count.c index e8c545e3..0d9046a8 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -74,10 +74,12 @@ print_count (notmuch_database_t *notmuch, const char *query_str, int ret = 0; notmuch_status_t status; - query = notmuch_query_create (notmuch, query_str); - if (query == NULL) { - fprintf (stderr, "Out of memory\n"); - return -1; + status = notmuch_query_create_with_syntax (notmuch, query_str, + shared_option_query_syntax (), + &query); + if (print_status_database ("notmuch count", notmuch, status)) { + ret = -1; + goto DONE; } for (notmuch_config_values_start (exclude_tags);