mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
vol: fix namei_ListAFSSubDirs on Windows
The directory level represented by 'dirp2' does not exist on Windows. Do not attempt to close the DIR object that was never opened. Remove unnecessary function prototypes. Change-Id: Ib6b27e52f0120115173cb04893092ba6f2da32fe Reviewed-on: http://gerrit.openafs.org/3703 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
259a0e886a
commit
141aca818e
@ -2343,8 +2343,9 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
|
||||
IHandle_t myIH = *dirIH;
|
||||
namei_t name;
|
||||
char path1[512], path3[512];
|
||||
DIR *dirp1, *dirp2, *dirp3;
|
||||
DIR *dirp1, *dirp3;
|
||||
#ifndef AFS_NT40_ENV
|
||||
DIR *dirp2;
|
||||
struct dirent *dp2;
|
||||
char path2[512];
|
||||
#endif
|
||||
@ -2358,11 +2359,6 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
|
||||
int wq_up = 0;
|
||||
struct rx_queue resultlist;
|
||||
#endif
|
||||
#ifdef DELETE_ZLC
|
||||
int i;
|
||||
static void AddToZLCDeleteList(char dir, char *name);
|
||||
static void DeleteZLCFiles(char *path);
|
||||
#endif
|
||||
|
||||
namei_HandleToVolDir(&name, &myIH);
|
||||
strlcpy(path1, name.n_path, sizeof(path1));
|
||||
@ -2493,7 +2489,9 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
|
||||
#ifdef AFS_SALSRV_ENV
|
||||
if (error) {
|
||||
closedir(dirp3);
|
||||
#ifndef AFS_NT40_ENV
|
||||
closedir(dirp2);
|
||||
#endif
|
||||
closedir(dirp1);
|
||||
ret = -1;
|
||||
goto error;
|
||||
@ -2507,7 +2505,9 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
|
||||
switch (code) {
|
||||
case -1:
|
||||
closedir(dirp3);
|
||||
#ifndef AFS_NT40_ENV
|
||||
closedir(dirp2);
|
||||
#endif
|
||||
closedir(dirp1);
|
||||
ret = -1;
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user