]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-dump.c
lib/cli: Make notmuch_database_open return a status code
[notmuch] / notmuch-dump.c
index 71ab0ea73d69f44de2505099c86f605e0d3cb33e..37432142761216e4a87494c3ac57bf79ad207c99 100644 (file)
@@ -36,9 +36,8 @@ notmuch_dump_command (unused (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, &notmuch))
        return 1;
 
     char *output_file_name = NULL;