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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150811080311.GC2650@quack.suse.cz>
Date:	Tue, 11 Aug 2015 10:03:11 +0200
From:	Jan Kara <jack@...e.cz>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Jan Kara <jack@...e.com>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] quota: remove an unneeded condition

On Tue 11-08-15 00:29:55, Dan Carpenter wrote:
> We know "ret" is zero here so we can remove this condition.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Thanks. I've added the patch to my tree.

								Honza

> diff --git a/fs/quota/quota.c b/fs/quota/quota.c
> index 86ded73..3746367 100644
> --- a/fs/quota/quota.c
> +++ b/fs/quota/quota.c
> @@ -141,9 +141,9 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
>  	if (tstate->flags & QCI_ROOT_SQUASH)
>  		uinfo.dqi_flags |= DQF_ROOT_SQUASH;
>  	uinfo.dqi_valid = IIF_ALL;
> -	if (!ret && copy_to_user(addr, &uinfo, sizeof(uinfo)))
> +	if (copy_to_user(addr, &uinfo, sizeof(uinfo)))
>  		return -EFAULT;
> -	return ret;
> +	return 0;
>  }
>  
>  static int quota_setinfo(struct super_block *sb, int type, void __user *addr)
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ