[CRIU] [PATCH 0/7] New helpers for easy string construction

Stanislav Kinsburskiу skinsbursky at odin.com
Thu Dec 17 03:59:05 PST 2015


17 дек. 2015 г. 12:50 PM пользователь Pavel Emelyanov <xemul at parallels.com> написал:
>
> On 12/17/2015 11:57 AM, Andrew Vagin wrote: 
> > On Thu, Dec 17, 2015 at 09:18:17AM +0100, Stanislav Kinsburskiу wrote: 
> >> 
> >> 17 дек. 2015 г. 9:10 AM пользователь Andrew Vagin <avagin at virtuozzo.com> написал: 
> >>> 
> >>> On Wed, Dec 16, 2015 at 06:32:57PM +0300, Stanislav Kinsburskiy wrote: 
> >>>> This patch set introduced new helpers add_to_string() and construct_string(), 
> >>>> which can be used to create or add to string a variable amount of parameters 
> >>>> in the way, like sprintf does, but including allocation of sufficient buffer 
> >>>> size. 
> >>> 
> >>> I don't like names of this functions. I can suggest xsprintf (like asprintf) and xstraddf. 
> >>> 
> >> 
> >> Why these names are better? 
> > 
> > All function for constructing string contain "printf". It will be easier 
> > to remember. 
> > 
> > It isn't obvious that construct_string() allocates memory. 
>
> Since the set is reworked anyway, also put the printf-args attribute to 
> these calls, like it's done here 
>
> https://github.com/xemul/criu/blob/master/include/criu-log.h#L37 
>
> please. 
>

Sure 

> -- Pavel 



More information about the CRIU mailing list