advapi/tests: CreateFile returns INVALID_HANDLE_VALUE on error (Smatch).

Michael Stefaniuc mstefani at redhat.de
Mon Aug 18 15:31:22 CDT 2008


---
 dlls/advapi32/tests/security.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 6b0ecfa..f2bafce 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -2496,7 +2496,7 @@ static void test_GetSecurityInfo(void)
     /* Create something.  Files have lots of associated security info.  */
     obj = CreateFile(myARGV[0], GENERIC_READ, FILE_SHARE_READ, NULL,
                      OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-    if (!obj)
+    if (obj == INVALID_HANDLE_VALUE)
     {
         skip("Couldn't create an object for GetSecurityInfo test\n");
         return;
-- 
1.6.0.rc3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080818/c2f3f590/attachment.pgp 


More information about the wine-patches mailing list