X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-search.c;h=3be296d8a3f67db106d139c882544f3746eb4d8d;hp=7dfd270e2019c651d6738a04e2cca7766a92bff7;hb=5fddc07dc31481453c1af186bf7da241c00cdbf1;hpb=1579fb334e0bbc42d5ae7692b184127f43ed7027 diff --git a/notmuch-search.c b/notmuch-search.c index 7dfd270e..3be296d8 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -486,9 +486,8 @@ notmuch_search_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 (notmuch, argc-opt_index, argv+opt_index);