diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index f0b78670afd..cf5b809d4ea 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -949,7 +949,7 @@ static void test_queryconfig2(void) pConfig->lpDescription = (LPSTR)0xdeadbeef; ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); ok(ret, "expected QueryServiceConfig2A to succeed\n"); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "expected needed to be %d, got %d\n", sizeof(SERVICE_DESCRIPTIONA), needed); + ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); ok(!pConfig->lpDescription, "expected lpDescription to be NULL, got %p\n", pConfig->lpDescription); SetLastError(0xdeadbeef); @@ -957,7 +957,7 @@ static void test_queryconfig2(void) ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,0,&needed); ok(!ret, "expected QueryServiceConfig2A to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "expected needed to be %d, got %d\n", sizeof(SERVICE_DESCRIPTIONA), needed); + ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); if(!pChangeServiceConfig2A) { diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index 632e3bc9770..3088e929141 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.c @@ -284,7 +284,7 @@ static void test_ExpandEnvironmentStringsA(void) strcpy(buf, "Indirect-%IndirectVar%-Indirect"); strcpy(buf2, "Indirect-Foo%EnvVar%Bar-Indirect"); ret_size = ExpandEnvironmentStringsA(buf, buf1, sizeof(buf1)); - ok(ret_size == strlen(buf2)+1, "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, strlen(buf2)+1); + ok(ret_size == strlen(buf2)+1, "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, lstrlen(buf2)+1); ok(!strcmp(buf1, buf2), "ExpandEnvironmentStrings returned [%s]\n", buf1); SetEnvironmentVariableA("IndirectVar", NULL); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d8e530be544..742734c26c7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3185,9 +3185,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, } if (Sampler >= sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0])) { - ERR("Current Sampler overflows sampleState0 array (sampler %d vs size %d)\n", Sampler, - sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0]) - ); + ERR("Current Sampler overflows sampleState0 array (sampler %d)\n", Sampler); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } /** @@ -3236,9 +3234,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface, } if (Sampler >= sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0])) { - ERR("Current Sampler overflows sampleState0 array (sampler %d vs size %d)\n", Sampler, - sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0]) - ); + ERR("Current Sampler overflows sampleState0 array (sampler %d)\n", Sampler); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } *Value = This->stateBlock->samplerState[Sampler][Type]; @@ -4417,9 +4413,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD } if (Stage >= sizeof(This->stateBlock->textures)/sizeof(This->stateBlock->textures[0])) { - ERR("Current stage overflows textures array (stage %d vs size %d)\n", Stage, - sizeof(This->stateBlock->textures)/sizeof(This->stateBlock->textures[0]) - ); + ERR("Current stage overflows textures array (stage %d)\n", Stage); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } @@ -4516,9 +4510,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD } if (Stage >= sizeof(This->stateBlock->textures)/sizeof(This->stateBlock->textures[0])) { - ERR("Current stage overflows textures array (stage %d vs size %d)\n", Stage, - sizeof(This->stateBlock->textures)/sizeof(This->stateBlock->textures[0]) - ); + ERR("Current stage overflows textures array (stage %d)\n", Stage); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ }