[lxc-devel] [PATCH 1/3] arguments: should return negative number when error happens
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Jun 3 15:51:33 UTC 2013
Quoting Qiang Huang (h.huangqiang at huawei.com):
> We should return -ENOMEM instead of ENOMEM when realloc fails.
>
> Signed-off-by: Qiang Huang <h.huangqiang at huawei.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
to all three. I will fix the typo you introduced in 3/3 inline.
thanks,
-serge
> ---
> src/lxc/arguments.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lxc/arguments.c b/src/lxc/arguments.c
> index 5f1c1af..8a8d306 100644
> --- a/src/lxc/arguments.c
> +++ b/src/lxc/arguments.c
> @@ -164,7 +164,7 @@ static int lxc_arguments_lxcpath_add(struct lxc_arguments *args,
> sizeof(args->lxcpath[0]));
> if (args->lxcpath == NULL) {
> lxc_error(args, "no memory");
> - return ENOMEM;
> + return -ENOMEM;
> }
> args->lxcpath[args->lxcpath_cnt++] = lxcpath;
> return 0;
> --
> 1.8.2.2
>
>
More information about the lxc-devel
mailing list