Commit cf0dadcf6ed2cfe52e2df68165f6448b6f26dbbc

Eduardo Bart 2012-11-20T01:19:31

Minor optimization in win32 do_lstat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index d0e366e..0efcaf5 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -121,10 +121,9 @@ static int do_lstat(
 			fbuf[flen] = L'\0';
 
 			if (GetFileAttributesExW(fbuf, GetFileExInfoStandard, &fdata)) {
-				if (!(fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+				if (!(fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
 					errno = ENOTDIR;
-					break;
-				}
+				break;
 			}
 		}
 	}