[CRIU] [PATCH v2] Fixes #334: Remove unneeded assignments

Andrei Vagin avagin at gmail.com
Fri Mar 15 19:31:19 MSK 2019


On Mon, Mar 11, 2019 at 09:53:56AM +0000, mitulkarnik.92 at gmail.com wrote:
> From: Mitul Karnik <mitulkarnik.92 at gmail.com>
> 
> Changing the subject line to incorporate review comments 

^^^ this doesn't look like a good description for the patch;)

"Fixes #334" should be moved from the subject line to the body.

> 
> Signed-off-by: Mitul Karnik <mitulkarnik.92 at gmail.com>
> ---
>  compel/arch/s390/src/lib/infect.c | 2 +-
>  criu/path.c                       | 2 +-
>  test/zdtm/static/dumpable02.c     | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/compel/arch/s390/src/lib/infect.c b/compel/arch/s390/src/lib/infect.c
> index 940d0441..b690b812 100644
> --- a/compel/arch/s390/src/lib/infect.c
> +++ b/compel/arch/s390/src/lib/infect.c
> @@ -455,7 +455,7 @@ void *remote_mmap(struct parasite_ctl *ctl,
>  	if (ptrace_poke_area(pid, &arg_struct, where, sizeof(arg_struct))) {
>  		pr_err("Can't restore mmap args (pid: %d)\n", pid);
>  		if (map != 0) {
> -			err = compel_syscall(ctl, __NR_munmap, NULL, map,
> +			compel_syscall(ctl, __NR_munmap, NULL, map,
>  					     length, 0, 0, 0, 0);
>  			map = 0;
>  		}
> diff --git a/criu/path.c b/criu/path.c
> index 70b0c472..22a89a4a 100644
> --- a/criu/path.c
> +++ b/criu/path.c
> @@ -99,7 +99,7 @@ char *mnt_get_sibling_path(struct mount_info *m,
>  		rpath++;
>  
>  	if (rpath[0] != '\0')
> -		off = snprintf(path, len, "/%s", rpath);
> +		snprintf(path, len, "/%s", rpath);
>  
>  	return buf;
>  }
> diff --git a/test/zdtm/static/dumpable02.c b/test/zdtm/static/dumpable02.c
> index bd632e13..024371bd 100644
> --- a/test/zdtm/static/dumpable02.c
> +++ b/test/zdtm/static/dumpable02.c
> @@ -143,8 +143,8 @@ int main(int argc, char **argv)
>  			return 1;
>  		}
>  
> -		ret = execl(argv[0], "dumpable_server", NULL);
> -		pr_perror("could not execv %s as a dumpable_server", argv[0]);
> +		execl(argv[0], "dumpable_server", NULL);
> +		pr_perror("could not execv %s as a dumpable_server\nError No: %d", argv[0], errno);
>  		return 1;
>  	}
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list