[CRIU] [PATCH 3/3] net: a file descriptor can be zero

Pavel Emelyanov xemul at parallels.com
Tue Jan 15 09:53:17 EST 2013


On 01/15/2013 06:44 PM, Andrey Vagin wrote:
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net.c b/net.c
> index 052bd46..94fa7ae 100644
> --- a/net.c
> +++ b/net.c
> @@ -317,7 +317,7 @@ static int restore_ip_dump(int type, int pid, char *cmd)
>  	int fd, ret;
>  
>  	ret = fd = open_image_ro(type, pid);
> -	if (fd > 0) {
> +	if (fd >= 0) {
>  		ret = run_ip_tool(cmd, "restore", fd, -1);
>  		close(fd);
>  	}
> 


All applied, thanks.


More information about the CRIU mailing list