[PATCH] Fix return value of NtOpenKey and remove todo.

Zac Brown zac at zacbrown.org
Mon Jun 2 20:01:50 CDT 2008


---
 dlls/ntdll/reg.c       |    2 +-
 dlls/ntdll/tests/reg.c |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 425ddf8..d04c9fd 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -121,7 +121,7 @@ NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTR
            debugstr_us(attr->ObjectName), access, retkey );
 
     if (len > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW;
-    if (!retkey) return STATUS_INVALID_PARAMETER;
+    if (!retkey) return STATUS_ACCESS_VIOLATION;
 
     SERVER_START_REQ( open_key )
     {
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 94f2a0b..418337a 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -351,9 +351,7 @@ static void test_NtOpenKey(void)
 
     /* NULL key */
     status = pNtOpenKey(NULL, 0, &attr);
-    todo_wine
-        ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
-
+    ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
     /* Length > sizeof(OBJECT_ATTRIBUTES) */
     attr.Length *= 2;
     status = pNtOpenKey(&key, am, &attr);
-- 
1.5.3.6


--------------090002030602020802080709--



More information about the wine-patches mailing list