From: Kareem Aladli karimri@protonmail.com
--- dlls/kernelbase/tests/process.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/kernelbase/tests/process.c b/dlls/kernelbase/tests/process.c index b66b15d6ee5..36723efb760 100644 --- a/dlls/kernelbase/tests/process.c +++ b/dlls/kernelbase/tests/process.c @@ -497,20 +497,18 @@ static void test_VirtualProtectFromApp(void) SetLastError(0xdeadbeef); p = VirtualAlloc(NULL, 0x1000, MEM_RESERVE, PAGE_READWRITE); ok(p && GetLastError() == 0xdeadbeef, "Got unexpected mem %p, GetLastError() %lu.\n", p, GetLastError()); - + ret = pVirtualProtectFromApp(p, 0x1000, PAGE_READONLY, &old_prot); ok(ret && old_prot == PAGE_READWRITE, "Failed to change protection old_prot %lu, GetLastError() %lu\n", old_prot, GetLastError());
ret = pVirtualProtectFromApp(p, 0x1000, PAGE_EXECUTE_READWRITE, &old_prot); - ok(!ret && old_prot == PAGE_READONLY, "Unexpected protection PAGE_EXECUTE_READWRITE old_prot %lu\n", - old_prot); + ok(!ret, "Unexpected protection PAGE_EXECUTE_READWRITE\n");
ret = pVirtualProtectFromApp(p, 0x1000, PAGE_EXECUTE_WRITECOPY, &old_prot); - ok(!ret && old_prot == PAGE_READONLY, "Unexpected protection PAGE_EXECUTE_WRITECOPY old_prot %lu\n", - old_prot); + ok(!ret, "Unexpected protection PAGE_EXECUTE_WRITECOPY\n");
- ret = VirtualFree(addr, 0, MEM_RELEASE); + ret = VirtualFree(p, 0, MEM_RELEASE); ok(ret, "Failed to free mem error %lu.\n", GetLastError()); }