Received: from eggs.gnu.org ([2001:4830:134:3::10]:49091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHuLi-0005If-8i for qemu-devel@nongnu.org; Wed, 22 Jul 2015 09:46:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHuLb-0002qr-A7 for qemu-devel@nongnu.org; Wed, 22 Jul 2015 09:46:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHuLb-0002qn-4e for qemu-devel@nongnu.org; Wed, 22 Jul 2015 09:46:11 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id AAF85345AB9 for ; Wed, 22 Jul 2015 13:46:10 +0000 (UTC) From: Markus Armbruster References: <1435001200-20610-1-git-send-email-armbru@redhat.com> <1435001200-20610-7-git-send-email-armbru@redhat.com> <55AE6F46.2020606@redhat.com> Date: Wed, 22 Jul 2015 15:46:08 +0200 In-Reply-To: <55AE6F46.2020606@redhat.com> (Eric Blake's message of "Tue, 21 Jul 2015 10:11:50 -0600") Message-ID: <87zj2ojof3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 6/7] error: Revamp interface documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: pbonzini@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com Eric Blake writes: > 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(-) >> >> 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. Fixing... >> * >> * 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/ Fixing... >> + * >> + * Receive an error and pass it on to the caller > > s/$/:/ Fixing... >> + * >> + * But when all you do with the error is passing it on, please use > > s/passing/pass/ Native speaker's advice accepted :) >> +/* >> + * 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/ Fixing... >> -/** >> - * 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). Yes, it's safe, and yes, it's worth documenting, so I'll do it in v2. > Overall, a definite improvement. Thanks!