diff --git a/dlls/kernel32/tests/alloc.c b/dlls/kernel32/tests/alloc.c index c1b2afc734d..86a31e7023a 100644 --- a/dlls/kernel32/tests/alloc.c +++ b/dlls/kernel32/tests/alloc.c @@ -51,7 +51,8 @@ static void test_Heap(void) HANDLE heap; LPVOID mem1,mem1a,mem3; UCHAR *mem2,*mem2a; - UINT error,i; + UINT i; + BOOL error; DWORD dwSize; /* Retrieve the page size for this system */ @@ -86,10 +87,10 @@ static void test_Heap(void) ok(mem2!=NULL,"HeapAlloc failed\n"); if(mem2) { ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n"); - error=0; + error=FALSE; for(i=0;i=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n"); - error=0; + error=FALSE; for(i=0;i<5*sysInfo.dwPageSize;i++) { if(mem2a[memchunk+i]!=0) { - error=1; + error=TRUE; } } ok(!error,"HeapReAlloc should have zeroed out it's allocated memory\n"); } /* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */ - error=0; + error=FALSE; mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo.dwPageSize); if(mem1a!=NULL) { if(mem1a!=mem1) { - error=1; + error=TRUE; } } - ok(mem1a==NULL || error==0,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); + ok(mem1a==NULL || !error,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); /* Check that HeapFree works correctly */ if(mem1a) { @@ -168,7 +169,8 @@ static void test_Global(void) ULONG memchunk; HGLOBAL mem1,mem2,mem2a,mem2b; UCHAR *mem2ptr; - UINT error,i; + UINT i; + BOOL error; memchunk=100000; SetLastError(NO_ERROR); @@ -187,10 +189,10 @@ static void test_Global(void) mem2ptr=GlobalLock(mem2); ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n"); if(mem2ptr) { - error=0; + error=FALSE; for(i=0;i=0) && (!done);i--) { if(path[i]=='.') - if(ext!=len) error=1; else ext=i; + if(ext!=len) error=TRUE; else ext=i; else if(path[i]=='\\') { if(i==len-1) { - error=1; + error=TRUE; } else { fil=i; - done=1; + done=TRUE; } } } diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index f5c5ecf4d15..8658ac4e077 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -183,12 +183,12 @@ static WCHAR* decodeW(const char* str) * exename: executable without the path * function-pointers, which are not implemented in all windows versions */ -static int init(void) +static BOOL init(void) { char *p; myARGC = winetest_get_mainargs( &myARGV ); - if (!GetCurrentDirectoryA(sizeof(base), base)) return 0; + if (!GetCurrentDirectoryA(sizeof(base), base)) return FALSE; strcpy(selfname, myARGV[0]); /* Strip the path of selfname */ @@ -206,7 +206,7 @@ static int init(void) pQueryFullProcessImageNameA = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameA"); pQueryFullProcessImageNameW = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameW"); pK32GetProcessImageFileNameA = (void *) GetProcAddress(hkernel32, "K32GetProcessImageFileNameA"); - return 1; + return TRUE; } /****************************************************************** @@ -2062,7 +2062,7 @@ static void test_DuplicateHandle(void) START_TEST(process) { - int b = init(); + BOOL b = init(); ok(b, "Basic init of CreateProcess test\n"); if (!b) return;