From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlnnG-0008HK-1g for qemu-devel@nongnu.org; Thu, 20 Dec 2012 16:36:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlnnD-0007hj-Cc for qemu-devel@nongnu.org; Thu, 20 Dec 2012 16:36:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlnnD-0007he-3D for qemu-devel@nongnu.org; Thu, 20 Dec 2012 16:36:39 -0500 Message-ID: <50D384E2.20107@redhat.com> Date: Thu, 20 Dec 2012 14:36:34 -0700 From: Eric Blake 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> In-Reply-To: <1355725509-5429-3-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig701E198523C3532FAD5E0A10" 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: Wenchao Xia Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig701E198523C3532FAD5E0A10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > +#define error_setg_replace(err, fmt, ...) do { \ > + if (*err !=3D 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 he= re? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig701E198523C3532FAD5E0A10 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ04TiAAoJEKeha0olJ0NqZR0IAKXy5HOstqFo4MQYRAy8RuD2 Rz1ENotDlpnt5F67/Dcuuat5w2Tfl8tlpTDjbYAVCRcpbFa6/7xSW+tmuQYw0YIn YwhJD453afvJ1nNuU5je/E4MW+vjkkiQmNuGu2CE4FOhr12gkAIBzAw+bmv6kaCw SgkYimji1tFCXBPsLRmrGJTMJHrhDGAxpcZkK8NrmvIqK+7TjQ+o8Q2GgxvdarA1 W6In+E7bgqJfNn/FoGljC1E7cXfFvQugg/2I+HXED+UXNoiZ6LthfibIAhurActG gyxuc69HtcHh6m2wS0lEMTzyTALxMeu7wa0Msr4G06FGJyBrbr0Y8QfmyKyZrJM= =zg6J -----END PGP SIGNATURE----- --------------enig701E198523C3532FAD5E0A10--