From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlsUj-0002k7-KE for qemu-devel@nongnu.org; Thu, 20 Dec 2012 21:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlsUi-0007zE-92 for qemu-devel@nongnu.org; Thu, 20 Dec 2012 21:37:53 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:42262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlsUh-0007yt-Kn for qemu-devel@nongnu.org; Thu, 20 Dec 2012 21:37:52 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Dec 2012 08:07:08 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 254D1125804E for ; Fri, 21 Dec 2012 08:07:39 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qBL2bcgg45547638 for ; Fri, 21 Dec 2012 08:07:40 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qBL2beDU025197 for ; Fri, 21 Dec 2012 13:37:40 +1100 Message-ID: <50D3CB6F.1040302@linux.vnet.ibm.com> Date: Fri, 21 Dec 2012 10:37:35 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1355725509-5429-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1355725509-5429-3-git-send-email-xiawenc@linux.vnet.ibm.com> <50D384E2.20107@redhat.com> In-Reply-To: <50D384E2.20107@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 2/6] snapshot: add error set function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, pbonzini@redhat.com 于 2012-12-21 5:36, Eric Blake 写道: > On 12/16/2012 11:25 PM, Wenchao Xia wrote: >> Added two function which will try replace the error if it is >> already set, so only last error is reported. >> > >> +#define error_setg_replace(err, fmt, ...) do { \ >> + if (*err != NULL) { \ >> + error_free(*err); \ >> + } \ >> + error_set(err, ERROR_CLASS_GENERIC_ERROR, fmt, ## __VA_ARGS__); \ >> +} while (/*CONSTCOND*/0) > > qemu-queue.h is the only other file in qemu.git that uses /*CONSTCOND*/ > notation, and that's because of the file origins; do we really need it here? > OK, /*CONSTCOND*/ will be removed. -- Best Regards Wenchao Xia