[PATCH 7/8] lib: fix error return bug with n_d_set_config.

Subject: [PATCH 7/8] lib: fix error return bug with n_d_set_config.

Date: Sun, 19 Jul 2020 10:18:56 -0300

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


The catch block either needs to return, or the function needs to
return "status". Choose the latter for consistency with
n_d_get_config.
---
 lib/config.cc             | 2 +-
 test/T562-lib-database.sh | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/config.cc b/lib/config.cc
index 292f0288..20036471 100644
--- a/lib/config.cc
+++ b/lib/config.cc
@@ -60,7 +60,7 @@ notmuch_database_set_config (notmuch_database_t *notmuch,
 	_notmuch_database_log (notmuch, "Error: A Xapian exception occurred setting metadata: %s\n",
 			       error.get_msg ().c_str ());
     }
-    return NOTMUCH_STATUS_SUCCESS;
+    return status;
 }
 
 static notmuch_status_t
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 46a1b843..81d5c540 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -349,7 +349,6 @@ EOF
 test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "set config in closed database"
-test_subtest_known_broken
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
     {
         EXPECT0(notmuch_database_close (db));
-- 
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: