diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 6e3851ddeed..f09acc9bc74 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -124,18 +124,22 @@ static void test_query_performance(void) ULONG FullLength; ULONG ReturnLength; SYSTEM_PERFORMANCE_INFORMATION spi; - BYTE Buffer[sizeof(SYSTEM_PERFORMANCE_INFORMATION) + 2]; + struct SPI_PLUS_EXTRA + { + SYSTEM_PERFORMANCE_INFORMATION spi; + BYTE extra[2]; + } spi_plus_extra; - status = pNtQuerySystemInformation(SystemPerformanceInformation, Buffer, 0, &FullLength); + status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, 0, &FullLength); ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - status = pNtQuerySystemInformation(SystemPerformanceInformation, Buffer, sizeof(spi), &ReturnLength); + status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, sizeof(spi), &ReturnLength); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( sizeof(spi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - status = pNtQuerySystemInformation(SystemPerformanceInformation, &Buffer, sizeof(Buffer), &ReturnLength); + status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi_plus_extra, sizeof(spi_plus_extra), &ReturnLength); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( ReturnLength == min(FullLength, sizeof(Buffer)), "Inconsistent length %d\n", ReturnLength); + ok( ReturnLength == min(FullLength, sizeof(spi_plus_extra)), "Inconsistent length %d\n", ReturnLength); /* Not return values yet, as struct members are unknown */ }