[PATCH] ntoskrnl.exe/tests: Use NULL instead of casting 0

Zebediah Figura z.figura12 at gmail.com
Fri Dec 7 15:03:33 CST 2018


On 12/07/2018 02:57 PM, Michael Stefaniuc wrote:
> Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
> ---
>   dlls/ntoskrnl.exe/tests/driver.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
> index 17e54cd508..8f41d39747 100644
> --- a/dlls/ntoskrnl.exe/tests/driver.c
> +++ b/dlls/ntoskrnl.exe/tests/driver.c
> @@ -435,7 +435,7 @@ static void test_sync(void)
>           ok(ret == i - 9, "expected %d, got %d\n", i - 9, ret);
>       }
>   
> -    run_thread(mutex_thread, (void *)0);
> +    run_thread(mutex_thread, NULL);
>   
>       ret = wait_single(&test_mutex, 0);
>       ok(ret == 0, "got %#x\n", ret);
> @@ -445,7 +445,7 @@ static void test_sync(void)
>       ret = KeReleaseMutex(&test_mutex, 0);
>       ok(ret == 0, "got %#x\n", ret);
>   
> -    run_thread(mutex_thread, (void *)0);
> +    run_thread(mutex_thread, NULL);
>   
>       /* test timers */
>       KeInitializeTimerEx(&timer, NotificationTimer);
> 

I'd argue this should be left as it is; the test is casting an NTSTATUS 
value to the (void *) used as the thread parameter.



More information about the wine-devel mailing list