[CRIU] [PATCH] cgroup: typo fix
Tycho Andersen
tycho.andersen at canonical.com
Thu Jun 16 07:41:52 PDT 2016
On Thu, Jun 16, 2016 at 07:37:22AM +0300, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>
>
> CID 163487 (#1 of 1): Unused value (UNUSED_VALUE)
> assigned_pointer: Assigning value from old_name to pe->name here, but that stored value is overwritten before it can be used.
>
> Cc: Tycho Andersen <tycho.andersen at canonical.com>
Hmm, I wonder why the test doesn't catch this. Anyway, thanks,
Acked-by: Tycho Andersen <tycho.andersen at canonical.com>
> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> ---
> criu/cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/criu/cgroup.c b/criu/cgroup.c
> index 45a06ca..b60b8ee 100644
> --- a/criu/cgroup.c
> +++ b/criu/cgroup.c
> @@ -1282,7 +1282,7 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e
> pe->value = "a";
> ret = restore_cgroup_prop(e->properties[j], path, off2);
> pe->name = old_name;
> - pe->name = old_val;
> + pe->value = old_val;
>
> if (ret < 0)
> return -1;
> --
> 2.7.4
>
More information about the CRIU
mailing list