diff options
| author | David Bremner <david@tethera.net> | 2017-02-18 11:08:04 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-03-22 08:47:13 -0300 |
| commit | 242d5a3ed5ed85bb935c8ed4a4678d7596d8534d (patch) | |
| tree | 19dd13df847db2aa51a6b17eaef77264524d4002 /notmuch-show.c | |
| parent | 3721bd45d72e50436ee760b03ae533d49bbb8724 (diff) | |
lib: make notmuch_query_add_tag_exclude return a status value
Since this is an ABI breaking change, but we already bumped the SONAME
for the next release
Diffstat (limited to 'notmuch-show.c')
| -rw-r--r-- | notmuch-show.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/notmuch-show.c b/notmuch-show.c index 64005948..7021008e 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1177,11 +1177,19 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) const char **search_exclude_tags; size_t search_exclude_tags_length; unsigned int i; + notmuch_status_t status; search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_length); - for (i = 0; i < search_exclude_tags_length; i++) - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); + + for (i = 0; i < search_exclude_tags_length; i++) { + status = notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); + if (status && status != NOTMUCH_STATUS_IGNORED) { + print_status_query ("notmuch show", query, status); + ret = -1; + goto DONE; + } + } if (exclude == EXCLUDE_FALSE) { notmuch_query_set_omit_excluded (query, FALSE); @@ -1191,6 +1199,7 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) ret = do_show (config, query, formatter, sprinter, ¶ms); } + DONE: notmuch_crypto_cleanup (¶ms.crypto); notmuch_query_destroy (query); notmuch_database_destroy (notmuch); |
