Unix CM: Don't zero args on dcache failure
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 21 Feb 2013 22:15:11 +0000 (22:15 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Sun, 24 Feb 2013 13:22:57 +0000 (05:22 -0800)
Even if allocating the dcache fails, there's no point zeroing the
parameters to the allocation function, as those changes aren't
visible outside of that function.

Caught by clang-analyzer

Change-Id: Ieb91b525e818b73e38b8d78a55d170d36273177c
Reviewed-on: http://gerrit.openafs.org/9234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/afs_dcache.c

index 0f53d5d..8833c39 100644 (file)
@@ -3319,7 +3319,6 @@ afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, int aflags)
            afs_warn("afsd: memory cache too large for available memory.\n");
            afs_warn("afsd: AFS files cannot be accessed.\n\n");
            dcacheDisabled = 1;
-           afiles = ablocks = 0;
        } else
            afs_warn("Memory cache: Allocating %d dcache entries...",
                   aDentries);