From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFbAL-00058l-7s for qemu-devel@nongnu.org; Mon, 17 Feb 2014 22:16:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFbAF-0005iK-5C for qemu-devel@nongnu.org; Mon, 17 Feb 2014 22:16:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFbAE-0005iF-TJ for qemu-devel@nongnu.org; Mon, 17 Feb 2014 22:16:07 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1I3G6kF026852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Feb 2014 22:16:06 -0500 Date: Tue, 18 Feb 2014 11:16:13 +0800 From: Fam Zheng Message-ID: <20140218031613.GD1228@T430.redhat.com> References: <1392138233-26407-1-git-send-email-pbonzini@redhat.com> <1392138233-26407-10-git-send-email-pbonzini@redhat.com> <20140214164540.GK32343@dhcp-200-207.str.redhat.com> <20140214165954.GD17514@localhost.localdomain> <87d2io7l0e.fsf@blackfin.pond.sub.org> <20140217131545.GA1428@T430.redhat.com> <87bny5vl75.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bny5vl75.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Paolo Bonzini , Jeff Cody , qemu-devel@nongnu.org On Mon, 02/17 15:59, Markus Armbruster wrote: > Fam Zheng writes: > > On Sat, 02/15 11:01, Markus Armbruster wrote: > > Does this mean that error_is_set() is always used by programmer to check a > > non-NULL error pointer? Is there any case to call error_is_set(errp) without > > knowing if errp is NULL or not? If no, should we enforce the rule and add > > assert(errp) in error_is_set()? > > If you know ERRP can't be null, then error_is_set(ERRP) is pointless. > Just test *ERRP instead. > > If ERRP may be null, then error_is_set(ERRP) makes some sense: it saves > you spelling out ERRP && *ERRP. Personally, I'd prefer it spelled out, > though. So the question is whether the returned boolean has any value to anyboday, if ERRP may be NULL. Fam