ntdll/tests: make sure return values are used (LLVM/Clang) (2/2)

Austin English austinenglish at gmail.com
Thu Feb 10 15:27:51 CST 2011


-- 
-Austin
-------------- next part --------------
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index c473262..e107dae 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -901,7 +901,11 @@ static void nt_mailslot_test(void)
         "rc = %x not STATUS_SUCCESS or STATUS_INVALID_PARAMETER\n", rc);
     ok( hslot != 0, "Handle is invalid\n");
 
-    if  ( rc == STATUS_SUCCESS ) rc = pNtClose(hslot);
+    if  ( rc == STATUS_SUCCESS ) 
+    {
+        rc = pNtClose(hslot);
+        ok( rc == STATUS_SUCCESS, "NtClose failed\n"); 
+    }
 
     /*
      * Test that the length field is checked properly
@@ -912,7 +916,11 @@ static void nt_mailslot_test(void)
          &TimeOut);
     todo_wine ok( rc == STATUS_INVALID_PARAMETER, "rc = %x not c000000d STATUS_INVALID_PARAMETER\n", rc);
 
-    if  (rc == STATUS_SUCCESS) pNtClose(hslot);
+    if  ( rc == STATUS_SUCCESS ) 
+    {
+        rc = pNtClose(hslot);
+        ok( rc == STATUS_SUCCESS, "NtClose failed\n"); 
+    }
 
     attr.Length = sizeof(OBJECT_ATTRIBUTES)+1;
     rc = pNtCreateMailslotFile(&hslot, DesiredAccess,
@@ -920,7 +928,11 @@ static void nt_mailslot_test(void)
          &TimeOut);
     todo_wine ok( rc == STATUS_INVALID_PARAMETER, "rc = %x not c000000d STATUS_INVALID_PARAMETER\n", rc);
 
-    if  (rc == STATUS_SUCCESS) pNtClose(hslot);
+    if  ( rc == STATUS_SUCCESS ) 
+    {
+        rc = pNtClose(hslot);
+        ok( rc == STATUS_SUCCESS, "NtClose failed\n"); 
+    }
 
     /*
      * Test handling of a NULL unicode string in ObjectName
@@ -934,7 +946,11 @@ static void nt_mailslot_test(void)
         rc == STATUS_INVALID_PARAMETER,
         "rc = %x not STATUS_OBJECT_PATH_SYNTAX_BAD or STATUS_INVALID_PARAMETER\n", rc);
 
-    if  (rc == STATUS_SUCCESS) pNtClose(hslot);
+    if  ( rc == STATUS_SUCCESS ) 
+    {
+        rc = pNtClose(hslot);
+        ok( rc == STATUS_SUCCESS, "NtClose failed\n"); 
+    }
 
     /*
      * Test a valid call


More information about the wine-patches mailing list