[PATCH 1/3] lib: drop two gratuitous assignments to database mode

Subject: [PATCH 1/3] lib: drop two gratuitous assignments to database mode

Date: Sun, 26 Jul 2020 20:31:34 -0300

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


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 | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/database.cc b/lib/database.cc
index 2aff56be..b987cb42 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -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;
-- 
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: