]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-show.c
lib/cli: Make notmuch_database_open return a status code
[notmuch] / notmuch-show.c
index 3b6667c4bdbd5d411fc35dabbe40bce8bc74d19b..95427d4fd3096f294714b8a1b4fb069f64fc0503 100644 (file)
@@ -1081,9 +1081,8 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
        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, &notmuch))
        return 1;
 
     query = notmuch_query_create (notmuch, query_string);