[PATCH] ntdll/tests: Avoid passing an uninitialized timeout to NtNotifyChangeKey().

Zebediah Figura z.figura12 at gmail.com
Tue Feb 23 19:40:01 CST 2021


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/ntdll/tests/reg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index ac1dec9f2f8..7463f98aa29 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -1850,7 +1850,7 @@ static void test_NtQueryKey(void)
 static void test_notify(void)
 {
     OBJECT_ATTRIBUTES attr;
-    LARGE_INTEGER timeout;
+    static const LARGE_INTEGER timeout;
     IO_STATUS_BLOCK iosb;
     UNICODE_STRING str;
     HANDLE key, key2, events[4], subkey;
@@ -1952,7 +1952,6 @@ static void test_notify(void)
         status = pNtNotifyChangeMultipleKeys(key, 0, NULL, events[0], NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE);
         ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
 
-        timeout.QuadPart = 0;
         status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
         ok(status == STATUS_TIMEOUT, "NtWaitForSingleObject returned %x\n", status);
 
-- 
2.20.1




More information about the wine-devel mailing list