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: <ECDFC360-1397-4C3E-AAC6-7FE532E8167C@oracle.com>
Date:   Tue, 11 Oct 2022 14:06:47 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Colin Ian King <colin.i.king@...il.com>
CC:     Jeff Layton <jlayton@...nel.org>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] NFSD: Remove redundant assignment to variable host_err



> On Oct 10, 2022, at 4:24 PM, Colin Ian King <colin.i.king@...il.com> wrote:
> 
> Variable host_err is assigned a value that is never read, it is being
> re-assigned a value in every different execution path in the following
> switch statement. The assignment is redundant and can be removed.
> 
> Cleans up clang-scan warning:
> warning: Value stored to 'host_err' is never read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>

Applying this for nfsd's for-next (not yet public). Thanks!



> ---
> fs/nfsd/vfs.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index f650afedd67f..5093ae788f53 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -1304,7 +1304,6 @@ nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
> 		iap->ia_mode &= ~current_umask();
> 
> 	err = 0;
> -	host_err = 0;
> 	switch (type) {
> 	case S_IFREG:
> 		host_err = vfs_create(&init_user_ns, dirp, dchild, iap->ia_mode, true);
> -- 
> 2.37.3
> 

--
Chuck Lever



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ