qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] scsi-generic: Simplify error handling code


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] scsi-generic: Simplify error handling code
Date: Thu, 18 Jan 2018 16:59:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 18/01/2018 16:55, Philippe Mathieu-Daudé wrote:
> On Thu, Jan 18, 2018 at 9:03 AM, Paolo Bonzini <address@hidden> wrote:
>> On 18/01/2018 12:21, Philippe Mathieu-Daudé wrote:
>>>> I'm not a fan of bool return types, in general (because "!" is often
>>>> success while "< 0" is failure) and especially when there is an Error**;
>>>> I disagree with commit 9d3b155186.  But the function is not in an area I
>>>> maintain so I'm queuing this, thanks.
>>> Do you prefer "if (local_err)" and "if (errp && *errp)" ?
>>
>> The latter is wrong.  I do prefer
> 
> Ok so my 253674981e24 missed that train too.

Well, sdhci_common_realize cannot fail so you can just remove the
Error** argument.

Paolo



reply via email to

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