From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D57A16DE14D1 for ; Mon, 5 Oct 2015 11:27:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.156 X-Spam-Level: X-Spam-Status: No, score=-0.156 tagged_above=-999 required=5 tests=[AWL=-0.180, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_SBL=0.644, URIBL_SBL_A=0.1] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vqdVxsjwtw5s for ; Mon, 5 Oct 2015 11:27:40 -0700 (PDT) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by arlo.cworth.org (Postfix) with ESMTPS id 4CB7B6DE1437 for ; Mon, 5 Oct 2015 11:27:40 -0700 (PDT) Received: by wicge5 with SMTP id ge5so133309533wic.0 for ; Mon, 05 Oct 2015 11:27:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=p/LOocw+a0KUet4fE2tWLSWH32BzcHagm8fLbEOeUBg=; b=Ylzn+nW3dwbfA+KqPhP3VrkWx0dYL/ZfS4H8k24Q6+TZU2MaNhikRgSvLkzy4hDRFn PRNBVfuC14mwvbTl8PrWRwnXtgfmYvU436IpkpYIknARhODZfhpVMAfsHhIVvlmTFNG+ NUNigq2HtLvND4TXsmeOM/qZ6c7Qhwmp3TdrDNK0ZeA+5naIjGQ/h80njfKrSZ5vYAHb S+erk0eOKOSQsj/oOUCpotfHAhKrSntfyFnBs1hRq1EPzmFpv2sx3HlBQwKqCbbCcTU0 GMK+ncGUMiqtXlGVHXNBbua8CFWEts5SUZnFFNF3NrZUtrQbg519Da+owN7LY+EctP6a rZGg== X-Gm-Message-State: ALoCoQmBB78MWpoZGTWnfl/4PALmz+SW3jIyFls7Q6MTfw7K+j0ic2mllB/ILPppcDg+l2oQT3bb X-Received: by 10.194.246.161 with SMTP id xx1mr31581992wjc.26.1444069658659; Mon, 05 Oct 2015 11:27:38 -0700 (PDT) Received: from localhost (mobile-access-bcee9f-54.dhcp.inet.fi. [188.238.159.54]) by smtp.gmail.com with ESMTPSA id o10sm15990659wia.4.2015.10.05.11.27.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 11:27:38 -0700 (PDT) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [Patch v4 7/9] lib: migrate notmuch_database_upgrade to new query_search API In-Reply-To: <1443367923-11867-8-git-send-email-david@tethera.net> References: <1443367923-11867-1-git-send-email-david@tethera.net> <1443367923-11867-8-git-send-email-david@tethera.net> User-Agent: Notmuch/0.20.2+101~g7b7dadb (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Mon, 05 Oct 2015 21:27:12 +0300 Message-ID: <87bncd8933.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 18:27:42 -0000 On Sun, 27 Sep 2015, David Bremner 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@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch