From: David Bremner Date: Sun, 19 Jul 2020 12:51:03 +0000 (-0300) Subject: lib: fix error return bug with n_d_set_config. X-Git-Tag: 0.31_rc0~92 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=b268c8c0711a12b26a3abd3c8dde38a3679999b1 lib: fix error return bug with n_d_set_config. The catch block either needs to return, or the function needs to return "status". Choose the latter for consistency with n_d_get_config. --- 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 cdc6fc12..f767fddf 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -357,7 +357,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));