lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 17:24:29 +0100 (CET)
From:	Lukáš Czerner <lczerner@...hat.com>
To:	Wei Yuan <weiyuan.wei@...wei.com>
cc:	tytso@....edu, adilger.kernel@...ger.ca,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: Remove useless condition in if statement.

On Tue, 17 Mar 2015, Wei Yuan wrote:

> Date: Tue, 17 Mar 2015 09:31:54 +0800
> From: Wei Yuan <weiyuan.wei@...wei.com>
> To: tytso@....edu, adilger.kernel@...ger.ca
> Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
> Subject: [PATCH] ext4: Remove useless condition in if statement.
> 
> In this if statement, the previous condition is useless, the later one has covered it.

Looks good, thanks!

Reviewed-by: Lukas Czerner <lczerner@...hat.com>

> 
> Signed-off-by: Weiyuan <weiyuan.wei@...wei.com>
> ---
>  fs/ext4/xattr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
> index 1e09fc7..f2ccad7 100644
> --- a/fs/ext4/xattr.c
> +++ b/fs/ext4/xattr.c
> @@ -639,8 +639,7 @@ ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s)
>  		free += EXT4_XATTR_LEN(name_len);
>  	}
>  	if (i->value) {
> -		if (free < EXT4_XATTR_SIZE(i->value_len) ||
> -		    free < EXT4_XATTR_LEN(name_len) +
> +		if (free < EXT4_XATTR_LEN(name_len) +
>  			   EXT4_XATTR_SIZE(i->value_len))
>  			return -ENOSPC;
>  	}
> --
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists