[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Loops without an increment step can suck, even on windows.
Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv28931/src/common
Modified Files:
util.c
Log Message:
Loops without an increment step can suck, even on windows.
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/util.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -d -r1.232 -r1.233
--- util.c 15 Nov 2005 03:05:15 -0000 1.232
+++ util.c 15 Nov 2005 03:16:32 -0000 1.233
@@ -1243,10 +1243,10 @@
}
result = smartlist_create();
while (1) {
- if (!strcmp(findData.cFileName, ".") ||
- !strcmp(findData.cFileName, ".."))
- continue;
- smartlist_add(result, tor_strdup(findData.cFileName));
+ if (strcmp(findData.cFileName, ".") &&
+ strcmp(findData.cFileName, "..")) {
+ smartlist_add(result, tor_strdup(findData.cFileName));
+ }
if (!FindNextFile(handle, &findData)) {
if (GetLastError() != ERROR_NO_MORE_FILES) {
warn(LD_FS, "Error reading directory.");