[CRIU] [PATCH 1/2] files: don't compare unsigned value against 0

Pavel Emelyanov xemul at parallels.com
Mon Jul 8 05:40:52 EDT 2013


On 07/08/2013 12:18 AM, Andrey Vagin wrote:
> CID 1042292 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)
> unsigned_compare: This less-than-zero comparison of an unsigned value is
> never true. "len < 0UL"
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  files.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/files.c b/files.c
> index ef9990e..3cbf52b 100644
> --- a/files.c
> +++ b/files.c
> @@ -138,7 +138,7 @@ int do_dump_gen_file(struct fd_parms *p, int lfd,
>  
>  int fill_fdlink(int lfd, const struct fd_parms *p, struct fd_link *link)
>  {
> -	size_t len;
> +	int len;
>  
>  	link->name[0] = '.';
>  
> 


Applied


More information about the CRIU mailing list