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

Re: [Xen-devel] [PATCH v7 5/9] Add an implentation of asprintf() for xen



>>> On 09.05.14 at 15:08, <Paul.Durrant@xxxxxxxxxx> wrote:
>>  -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Sent: 09 May 2014 14:07
>> To: Paul Durrant
>> Cc: Ian Campbell; Ian Jackson; xen-devel@xxxxxxxxxxxxx; Keir (Xen.org); Tim
>> (Xen.org)
>> Subject: Re: [PATCH v7 5/9] Add an implentation of asprintf() for xen
>> 
>> >>> On 09.05.14 at 10:40, <paul.durrant@xxxxxxxxxx> wrote:
>> > +int vasprintf(char **bufp, const char *fmt, va_list args)
>> > +{
>> > +    va_list args_copy;
>> > +    size_t size;
>> > +    char *buf, dummy[1];
>> > +
>> > +    va_copy(args_copy, args);
>> > +    size = vsnprintf(dummy, 0, fmt, args_copy);
>> 
>> Hmm, this is still dummy rather than NULL.
> 
> Yes, I explained why - I thought you were ok with that.

No, I wasn't - the argument was rather weak: If we had a problem
with NULL in vsnprintf() then we ought to fix it rather than working
around.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.