]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vol: fix namei_ListAFSSubDirs on Windows
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 20 Jan 2011 06:56:33 +0000 (01:56 -0500)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Feb 2011 15:24:17 +0000 (07:24 -0800)
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.

Reviewed-on: http://gerrit.openafs.org/3703
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 141aca818ef9e5a6af309edc9512cc5cfee38e90)

Change-Id: I640d834f0bfd6490cf43183843d771f792f7fc06
Reviewed-on: http://gerrit.openafs.org/3850
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/namei_ops.c

index 0ce41e303d1b6427a7465702872a9d23959a62d9..ba16cda8b4715a21eed3759891160b019456fa98 100644 (file)
@@ -2340,8 +2340,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
@@ -2355,11 +2356,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));
@@ -2490,7 +2486,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;
@@ -2504,7 +2502,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;