Actually, all of the initializers in this small function are dead.
Change-Id: If89fe3222ec39b34233f92f3aafd458f5723b0c5
Reviewed-on: http://gerrit.openafs.org/7771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
VWalkVolumeHeaders(struct DiskPartition64 *dp, const char *partpath,
VWalkVolFunc volfunc, VWalkErrFunc errfunc, void *rock)
{
- DIR *dirp = NULL;
- struct dirent *dentry = NULL;
+ DIR *dirp;
+ struct dirent *dentry;
int code = 0;
struct VolumeDiskHeader diskHeader;
goto done;
}
- while ((dentry = readdir(dirp))) {
- char *p = dentry->d_name;
+ while ((dentry = readdir(dirp)) != NULL) {
+ char *p;
p = strrchr(dentry->d_name, '.');
if (p != NULL && strcmp(p, VHDREXT) == 0) {
char name[VMAXPATHLEN];