]> sourceware.org Git - newlib-cygwin.git/commitdiff
* syscalls.cc (check_dir_not_empty): Never count more than 3 directory
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 12 Dec 2010 15:32:45 +0000 (15:32 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 12 Dec 2010 15:32:45 +0000 (15:32 +0000)
entries.

winsup/cygwin/ChangeLog
winsup/cygwin/syscalls.cc

index 1de5dee9febcd3bfff85c50d3fe668f46b0d93d0..06ce363140723663b314fc234cc751330c1c5d41 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-12  Corinna Vinschen  <corinna@vinschen.de>
+
+       * syscalls.cc (check_dir_not_empty): Never count more than 3 directory
+       entries.
+
 2010-12-12  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * init.cc (search_for): Put this in shared section or suffer subtle
index eeb998aaf6a839b0da84f7656c325d3961e80ba8..c38671f397719e6be7335265108216bafcad008e 100644 (file)
@@ -514,14 +514,13 @@ check_dir_not_empty (HANDLE dir)
   int cnt = 1;
   while (pfni->NextEntryOffset)
     {
+      if (++cnt > 2)
+       {
+         syscall_printf ("Directory not empty");
+         return STATUS_DIRECTORY_NOT_EMPTY;
+       }
       pfni = (PFILE_NAMES_INFORMATION)
             ((caddr_t) pfni + pfni->NextEntryOffset);
-      ++cnt;
-    }
-  if (cnt > 2)
-    {
-      syscall_printf ("Directory not empty");
-      return STATUS_DIRECTORY_NOT_EMPTY;
     }
   return STATUS_SUCCESS;
 }
This page took 0.037616 seconds and 5 git commands to generate.