[lxc-devel] [PATCH 4/6] c api -> createl: correctly handle 0 template args

Stéphane Graber stgraber at ubuntu.com
Mon Mar 4 22:02:16 UTC 2013


On 03/04/2013 03:43 PM, Serge Hallyn wrote:
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  src/lxc/lxccontainer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index bcfc8b6..3eaf41e 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -692,7 +692,8 @@ static bool lxcapi_createl(struct lxc_container *c, char *t, ...)
>  		args[nargs - 1] = arg;
>  	}
>  	va_end(ap);
> -	args[nargs] = NULL;
> +	if (args)
> +		args[nargs] = NULL;
>  
>  	bret = c->create(c, t, args);
>  
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130304/cd5d6ffb/attachment.pgp>


More information about the lxc-devel mailing list