[PATCH] ntoskrnl.exe/tests: Use NULL instead of casting 0
Zebediah Figura
z.figura12 at gmail.com
Fri Dec 7 15:43:08 CST 2018
On 12/07/2018 03:40 PM, Michael Stefaniuc wrote:
> 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?
>
Well, maybe, but given that KeWaitForMultipleObjects returns an index,
this isn't clearly better.
More information about the wine-devel
mailing list