qemu-block
[Top][All Lists]
Advanced

[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: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH 04/18] nbd/client: refactor nbd_receive_starttls
Date: Fri, 10 Feb 2017 14:23:36 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

09.02.2017 17:41, Eric Blake wrote:
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?).


This race would be if one thread decides to print two option names in one message. Or save one option in a var, then print other, then print var.



--
Best regards,
Vladimir




reply via email to

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