qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors
Date: Tue, 18 Feb 2014 11:16:13 +0800
User-agent: Mutt/1.5.22 (2013-10-16)

On Mon, 02/17 15:59, Markus Armbruster wrote:
> Fam Zheng <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]