qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 34/34] nbd: assert that Error** is not NULL in nbd_iter_channe


From: Markus Armbruster
Subject: Re: [PULL 34/34] nbd: assert that Error** is not NULL in nbd_iter_channel_error
Date: Wed, 18 Dec 2019 08:31:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 12/17/19 12:26 AM, Markus Armbruster wrote:
>> From: Vladimir Sementsov-Ogievskiy <address@hidden>
>>
>> All callers of nbd_iter_channel_error() pass the address of a
>> local_err variable, and only call this function if an error has
>> already occurred, using this function to propagate that error.
>> This is already implied by its name (local_err instead of the classic
>> errp), but it is worth additionally stressing this by adding an
>> assertion to make it part of the function contract.
>>
>> The local_err parameter is not here to return information about
>> nbd_iter_channel_error failure. Instead it's assumed to be filled when
>> passed to the function. This is already stressed by its name
>> (local_err, instead of classic errp). Stress it additionally by
>> assertion.
>
> Redundant paragraph, but probably too late to worry about it now that
> we have a pull request.

I'll have to respin anyway.  I'll drop the second paragraph.




reply via email to

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