]> git.notmuchmail.org Git - notmuch/commitdiff
lib: drop two gratuitous assignments to database mode
authorDavid Bremner <david@tethera.net>
Sun, 26 Jul 2020 23:31:34 +0000 (20:31 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 28 Jul 2020 11:47:58 +0000 (08:47 -0300)
I'm not sure what the point of modifying that right before destroying
the object is. In a future commit I want to remove that element of the
object, so simplify that task.

lib/database.cc

index 2aff56bebd04e3c94356b71c8bf5893bb5278c66..b987cb420ec5892d52a8eaef94ca97aae8ed5bf7 100644 (file)
@@ -994,7 +994,6 @@ notmuch_database_open_verbose (const char *path,
                                     "       has a newer database format version (%u) than supported by this\n"
                                     "       version of notmuch (%u).\n",
                                     notmuch_path, version, NOTMUCH_DATABASE_VERSION));
-           notmuch->mode = NOTMUCH_DATABASE_MODE_READ_ONLY;
            notmuch_database_destroy (notmuch);
            notmuch = NULL;
            status = NOTMUCH_STATUS_FILE_ERROR;
@@ -1013,7 +1012,6 @@ notmuch_database_open_verbose (const char *path,
                                     "       requires features (%s)\n"
                                     "       not supported by this version of notmuch.\n",
                                     notmuch_path, incompat_features));
-           notmuch->mode = NOTMUCH_DATABASE_MODE_READ_ONLY;
            notmuch_database_destroy (notmuch);
            notmuch = NULL;
            status = NOTMUCH_STATUS_FILE_ERROR;