X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=2f9812821ebeb7cf2f18542541beaf9a8e37e4be;hp=9c2ad7b2a9226bb8ee616779d88cde69171ac704;hb=5fddc07dc31481453c1af186bf7da241c00cdbf1;hpb=1579fb334e0bbc42d5ae7692b184127f43ed7027 diff --git a/notmuch-count.c b/notmuch-count.c index 9c2ad7b2..2f981282 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -66,9 +66,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY); - if (notmuch == NULL) + if (notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much)) return 1; query_str = query_string_from_args (ctx, argc-opt_index, argv+opt_index);