[PATCH 2/4] lib/config: remove redundant call to notmuch_config_get

Subject: [PATCH 2/4] lib/config: remove redundant call to notmuch_config_get

Date: Mon, 9 Nov 2026 17:24:32 -0400

To: Christian Weiske, notmuch@notmuchmail.org

Cc:

From: David Bremner


The value is overwritten two lines below, and notmuch_config_get has
no visible side effects (the relevant string map may get sorted),
so this duplicate call seems pointless.
---
 lib/config.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/config.cc b/lib/config.cc
index 9bbbe467..799194f2 100644
--- a/lib/config.cc
+++ b/lib/config.cc
@@ -697,7 +697,7 @@ _notmuch_config_load_defaults (notmuch_database_t *notmuch)
     for (key = NOTMUCH_CONFIG_FIRST;
 	 key < NOTMUCH_CONFIG_LAST;
 	 key = notmuch_config_key_t (key + 1)) {
-	const char *val = notmuch_config_get (notmuch, key);
+	const char *val = NULL;
 	const char *key_string = _notmuch_config_key_to_string (key);
 
 	val = _notmuch_string_map_get (notmuch->config, key_string);
-- 
2.53.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: