[Top][All Lists]

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

Re: [Qemu-block] [PATCH v2 4/6] nbd/server: Add va_list form of nbd_nego

From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v2 4/6] nbd/server: Add va_list form of nbd_negotiate_send_rep_err()
Date: Thu, 11 Jan 2018 13:58:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/11/2018 12:05 PM, Vladimir Sementsov-Ogievskiy wrote:
> 11.01.2018 02:08, Eric Blake wrote:
>> This will be useful for the next patch.
>> Based on a patch by Vladimir Sementsov-Ogievskiy
>> Signed-off-by: Eric Blake <address@hidden>
>> ---
>>   nbd/server.c | 24 ++++++++++++++++++------
>>   1 file changed, 18 insertions(+), 6 deletions(-)

>> -static int GCC_FMT_ATTR(4, 5)
>> -nbd_negotiate_send_rep_err(NBDClient *client, uint32_t type,
>> -                           Error **errp, const char *fmt, ...)
>> +static int GCC_FMT_ATTR(4, 0)
>> +nbd_negotiate_send_rep_verr(NBDClient *client, uint32_t type,
>> +                            Error **errp, const char *fmt, va_list va)
> Hmm you placed fmt and va after errp. Previously we discussed one
> exclusion from "errp should be last" -
> "...", variable number of arguments. So, it is new exclusion (or I
> missed something?).. Looks good for me,
> anyway, as it corresponds to "errp, fmt, ..." notation.

Indeed, it is precisely because I value consistency between 'fmt, ...'
and 'fmt, va_list' higher than 'errp last' that I rearranged things from
your patch into the form I used.  Or worded another way, even though
va_list is only one argument in name, I treat it the same as the
variable number of arguments that warrants the exception to the errp
last rule of thumb.

> Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>

Thanks; I think this series is now ready for staging on my NBD queue;
although my next pull request won't be until after the weekend.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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