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

Michael Stefaniuc mstefani at winehq.org
Fri Dec 7 15:40:00 CST 2018


On 12/7/18 10:03 PM, Zebediah Figura wrote:
> 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.
If it is a NTSTATUS shouldn't you use STATUS_SUCCESS instead of 0 then?

bye
	michael




More information about the wine-devel mailing list