Avoid useless comparison dlls/shell32/tests/shelllink.c
Gerald Pfeifer
gerald at pfeifer.com
Thu Nov 1 09:30:55 CDT 2007
Here, r is of type DWORD which is unsigned, so r>=0 is always true,
and a check does not make any sense.
Gerald
ChangeLog:
Remove useless comparision >= 0 for unsigned variables.
Index: dlls/shell32/tests/shelllink.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/tests/shelllink.c,v
retrieving revision 1.23
diff -u -3 -p -r1.23 shelllink.c
--- dlls/shell32/tests/shelllink.c 17 Aug 2007 11:31:41 -0000 1.23
+++ dlls/shell32/tests/shelllink.c 1 Nov 2007 14:28:36 -0000
@@ -527,7 +527,7 @@ static void test_load_save(void)
check_lnk(lnkfile, &desc, 0x0);
r=GetModuleFileName(NULL, mypath, sizeof(mypath));
- ok(r>=0 && r<sizeof(mypath), "GetModuleFileName failed (%d)\n", r);
+ ok(r<sizeof(mypath), "GetModuleFileName failed (%d)\n", r);
strcpy(mydir, mypath);
p=strrchr(mydir, '\\');
if (p)
@@ -564,9 +564,9 @@ static void test_load_save(void)
/* Create a temporary non-executable file */
r=GetTempPath(sizeof(mypath), mypath);
- ok(r>=0 && r<sizeof(mypath), "GetTempPath failed (%d), err %d\n", r, GetLastError());
+ ok(r<sizeof(mypath), "GetTempPath failed (%d), err %d\n", r, GetLastError());
r=pGetLongPathNameA(mypath, mydir, sizeof(mydir));
- ok(r>=0 && r<sizeof(mydir), "GetLongPathName failed (%d), err %d\n", r, GetLastError());
+ ok(r<sizeof(mydir), "GetLongPathName failed (%d), err %d\n", r, GetLastError());
p=strrchr(mydir, '\\');
if (p)
*p='\0';
More information about the wine-patches
mailing list