[Patch v4 7/9] lib: migrate notmuch_database_upgrade to new query_search API
Jani Nikula
jani at nikula.org
Mon Oct 5 11:27:12 PDT 2015
On Sun, 27 Sep 2015, David Bremner <david at tethera.net> wrote:
> Here we depend on the error path cleaning up query
LGTM
> ---
> lib/database.cc | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lib/database.cc b/lib/database.cc
> index f39d448..5e86955 100644
> --- a/lib/database.cc
> +++ b/lib/database.cc
> @@ -1450,9 +1450,10 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,
>
> query = notmuch_query_create (notmuch, "");
>
> - /* XXX: this should use the _st version, but needs an error
> - path */
> - for (messages = notmuch_query_search_messages (query);
> + status = notmuch_query_search_messages_st (query, &messages);
> + if (status)
> + goto DONE;
> + for (;
> notmuch_messages_valid (messages);
> notmuch_messages_move_to_next (messages))
> {
> --
> 2.5.3
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list