[PATCH v2 3/8] ntdll/tests: Make the zero_bits parameter explicit in all tests
Huw Davies
huw at codeweavers.com
Mon Jun 17 04:45:17 CDT 2019
On Fri, Jun 14, 2019 at 03:11:12PM +0200, Rémi Bernon wrote:
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
> dlls/ntdll/tests/virtual.c | 75 +++++++++++++++++++++++++-------------
> 1 file changed, 50 insertions(+), 25 deletions(-)
>
> diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c
> index 26d058185fd..2a71a561a90 100644
> --- a/dlls/ntdll/tests/virtual.c
> +++ b/dlls/ntdll/tests/virtual.c
> @@ -39,21 +39,24 @@ static void test_AllocateVirtualMemory(void)
> /* simple allocation should success */
> size = 0x1000;
> addr1 = NULL;
> - status = NtAllocateVirtualMemory(NtCurrentProcess(), &addr1, 0, &size,
> + zero_bits = 0;
> + status = NtAllocateVirtualMemory(NtCurrentProcess(), &addr1, zero_bits, &size,
> MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE);
Does this really make things better? If you follow this logic through you'll be
creating a variable for every parameter and initialising it before each call.
Huw.
More information about the wine-devel
mailing list