Unix CM: Remove dead assignment in readdir
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 21 Feb 2013 20:50:07 +0000 (20:50 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 24 Feb 2013 19:29:43 +0000 (11:29 -0800)
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 <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/afs/VNOPS/afs_vnop_readdir.c

index 4b5ea6c..5efe300 100644 (file)
@@ -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;