[Top][All Lists]

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

Re: [Qemu-block] [PATCH 04/18] nbd/client: refactor nbd_receive_starttls

From: Eric Blake
Subject: Re: [Qemu-block] [PATCH 04/18] nbd/client: refactor nbd_receive_starttls
Date: Thu, 9 Feb 2017 08:41:03 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 02/09/2017 12:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> 07.02.2017 19:32, Eric Blake wrote:
>> On 02/03/2017 09:47 AM, Vladimir Sementsov-Ogievskiy wrote:
>>> Split out nbd_receive_simple_option to be reused for structured reply
>>> option.

>>> +    return "<unknown option>";
>> Can you please consider making this include the %d representation of the
>> unknown option; perhaps by snprintf'ing into static storage?  While it
> Hmm.. The caller should free it in this case.

Only if you print it into malloc'd space. I think that printing it into
static storage may be sufficient (although then we have a race if more
than one thread is trying to use that static storage at the same time -
but do we ever have more than one thread trying to handle an error at
the same time?).

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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