From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1bCQ-0003nX-Nb for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1bCP-00050G-S4 for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:51:42 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:51259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1bCP-000503-JW for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:51:41 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Aug 2012 11:51:39 +0100 Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7FApThJ21299372 for ; Wed, 15 Aug 2012 10:51:29 GMT Received: from d06av10.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7FAMfG4028456 for ; Wed, 15 Aug 2012 06:22:42 -0400 Date: Wed, 15 Aug 2012 11:51:32 +0100 From: Stefan Hajnoczi Message-ID: <20120815105132.GG27481@stefanha-thinkpad.localdomain> References: <1344953651-16622-1-git-send-email-benoit@irqsave.net> <1344953651-16622-10-git-send-email-benoit@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1344953651-16622-10-git-send-email-benoit@irqsave.net> Subject: Re: [Qemu-devel] [RFC V3 9/9] quorum: Add quorum mechanism. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, =?iso-8859-1?Q?Beno=EEt?= Canet , qemu-devel@nongnu.org, blauwirbel@gmail.com, anthony@codemonkey.ws, pbonzini@redhat.com, eblake@redhat.com, afaerber@suse.de On Tue, Aug 14, 2012 at 04:14:11PM +0200, Benoît Canet wrote: > +#define QUORUM_FREE_QIOV_ITEMS(qlist) do { \ > + QLIST_FOREACH_SAFE(item, qlist, next, next_item) { \ > + QLIST_REMOVE(item, next); \ > + g_free(item); \ > + } } while (0) This is only used once, please open code it and don't use a macro. > + > +static void quorum_free_vote_list(QuorumAIOCB *acb) > +{ > + QuorumIOVectorVersion *version, *next_version; > + QuorumIOVectorItem *item, *next_item; > + > + QLIST_FOREACH_SAFE(version, &acb->vote_list, next, next_version) { > + QLIST_REMOVE(version, next); > + QUORUM_FREE_QIOV_ITEMS(&version->qiov_items); > + g_free(version); > + } > +} > + > +#undef QUORUM_FREE_QIOV_ITEMS