Re: [Qemu-devel] [PATCH v25 31/31] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-27 Thread Chun Yan Liu


>>> On 4/25/2014 at 09:43 PM, in message
<20140425134327.gi3...@stefanha-thinkpad.redhat.com>, Stefan Hajnoczi
 wrote: 
> On Fri, Apr 11, 2014 at 01:54:27AM +0800, Chunyan Liu wrote: 
> >  /* Realloc dst option list and append options from an option list (list) 
> >   * to it. dst could be NULL or a malloced list. 
> > + * Result dst has shorter lifetime then input list. 
>  
> s/then/than/ 
>  
> But I think it's helpful to be more explicit: 
>  
> The lifetime of dst must be shorter than the input list because the 
> QemuOptDesc->name, ->help, and ->def_value_str strings are shared. 
>  
>  
Will update. Thanks.

Chunyan




Re: [Qemu-devel] [PATCH v25 31/31] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-25 Thread Stefan Hajnoczi
On Fri, Apr 11, 2014 at 01:54:27AM +0800, Chunyan Liu wrote:
>  /* Realloc dst option list and append options from an option list (list)
>   * to it. dst could be NULL or a malloced list.
> + * Result dst has shorter lifetime then input list.

s/then/than/

But I think it's helpful to be more explicit:

The lifetime of dst must be shorter than the input list because the
QemuOptDesc->name, ->help, and ->def_value_str strings are shared.