From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHa95-0000gp-RS for qemu-devel@nongnu.org; Tue, 21 Jul 2015 12:11:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHa91-0006QU-Pc for qemu-devel@nongnu.org; Tue, 21 Jul 2015 12:11:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHa91-0006QO-Ig for qemu-devel@nongnu.org; Tue, 21 Jul 2015 12:11:51 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 41B233500E6 for ; Tue, 21 Jul 2015 16:11:51 +0000 (UTC) References: <1435001200-20610-1-git-send-email-armbru@redhat.com> <1435001200-20610-7-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55AE6F46.2020606@redhat.com> Date: Tue, 21 Jul 2015 10:11:50 -0600 MIME-Version: 1.0 In-Reply-To: <1435001200-20610-7-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qxP7VXuiosQ8u9KOQatNBKXhKsRWxbMr5" Subject: Re: [Qemu-devel] [PATCH 6/7] error: Revamp interface documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, dgilbert@redhat.com, mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qxP7VXuiosQ8u9KOQatNBKXhKsRWxbMr5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/22/2015 01:26 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > include/qapi/error.h | 176 ++++++++++++++++++++++++++++++++++++-------= -------- > 1 file changed, 126 insertions(+), 50 deletions(-) >=20 > diff --git a/include/qapi/error.h b/include/qapi/error.h > index 8c3a7dd..9466b09 100644 > --- a/include/qapi/error.h > +++ b/include/qapi/error.h > @@ -2,13 +2,75 @@ > * QEMU Error Objects > * > * Copyright IBM, Corp. 2011 > + * Copyright (C) 2011-2015 Red Hat, Inc. > * > * Authors: > * Anthony Liguori > + * Markus Armbruster , Trailing comma, but not intermediate, looks weird. > * > * This work is licensed under the terms of the GNU LGPL, version 2. = See > * the COPYING.LIB file in the top-level directory. > */ > + > +/* > + * Error reporting system losely patterned after Glib's GError. s/losely/loosely/ > + * > + * Receive an error and pass it on to the caller s/$/:/ > + * > + * But when all you do with the error is passing it on, please use s/passing/pass/ > +/* > + * Propagate error object (if any) from @local_err to @dst_errp. > + * If @local_err is NULL, do nothing (because there's nothing to > + * propagate). > + * Else, if @dst_errp is NULL, errors are being ignored. Free the > + * error object. > + * Else, if @dst_errp, is &error_abort, print a suitable message and s/dst_errp,/dst_errp/ > -/** > - * Free an error object. > +/* > + * Free @err. > */ > void error_free(Error *err); Is error_free(NULL) safe? Worth documenting (because it affects paradigms used in cleanup labels). Overall, a definite improvement. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qxP7VXuiosQ8u9KOQatNBKXhKsRWxbMr5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVrm9GAAoJEKeha0olJ0Nq8BcH/3lx0u8OmrYO9u2C3Esn6vdV /YSMVym664XLAFy153TgX94s6DCXmjAWqiQMly3c1gXZL0QO7ATbu6apZDw7n6XL FPLR0DFGgiteSekimBfsxciicwPnkVfotuAdHmRElDuQE9UevCDIXySZ6G/wB5Xu jER7Pn8M4qVpjs24KMv5cWEIh77pgaat2aWbnxdokCey73NJ5R9hZp1qMrNyfEaW YrrzsJdefCaT4sWsQ3o+f10OcmVgtd7We1XiV1H/Q6Gi+bc6nk3BeGcIMGS0H4sw i/CYi4RCjJ1mvkBVWCI6i0TZJPuneQJhcNvAWk2P9b3F/Geb2Cwg7LFzb0115Dc= =GTeq -----END PGP SIGNATURE----- --qxP7VXuiosQ8u9KOQatNBKXhKsRWxbMr5--