From: Simon Wilkinson Date: Thu, 21 Feb 2013 20:50:07 +0000 (+0000) Subject: Unix CM: Remove dead assignment in readdir X-Git-Tag: upstream/1.8.0_pre1^2~1449 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d149f391b39f59428b2cbb55bdc5dc2429c99dfb;p=packages%2Fo%2Fopenafs.git Unix CM: Remove dead assignment in readdir len is zeroed at the start of the next block, so don't bother assigning tlen to it if we're not going to do anything with it. Caught by clang-analyzer Change-Id: Ie1cd5a4d9dd96920018f054b6edfc18c569c9807 Reviewed-on: http://gerrit.openafs.org/9206 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/afs/VNOPS/afs_vnop_readdir.c b/src/afs/VNOPS/afs_vnop_readdir.c index 4b5ea6cee..5efe300ce 100644 --- a/src/afs/VNOPS/afs_vnop_readdir.c +++ b/src/afs/VNOPS/afs_vnop_readdir.c @@ -666,7 +666,6 @@ afs_readdir(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred) goto done; /* get a reference to the entire directory */ tdc = afs_GetDCache(avc, (afs_size_t) 0, &treq, &origOffset, &tlen, 1); - len = tlen; if (!tdc) { code = ENOENT; goto done;