Saulius Krasuckas : mscms: Branching fixes for some test routines

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 20 05:40:20 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 44e942fbb14d249843c8b212f14c4bbf901ad6c1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=44e942fbb14d249843c8b212f14c4bbf901ad6c1

Author: Saulius Krasuckas <saulius.krasuckas at ieee.org>
Date:   Mon Feb 20 11:12:53 2006 +0100

mscms: Branching fixes for some test routines

---

 dlls/mscms/tests/profile.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c
index c982528..5714cb6 100644
--- a/dlls/mscms/tests/profile.c
+++ b/dlls/mscms/tests/profile.c
@@ -527,7 +527,6 @@ static HKEY reg_open_mscms_key(void)
     RegCloseKey( win9x_key );
     RegCloseKey( winNT_key );
 
-    if ( !ICM_key ) return NULL;
     return ICM_key;
 }
 
@@ -548,15 +547,24 @@ static void check_registry(void)
     }
 
     res = RegQueryInfoKeyA(hkIcmKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwValCount, NULL, NULL, NULL, NULL);
+    if (!res) 
+    {
+        trace("RegQueryInfoKeyA() failed\n");
+        return;
+    }
+
     trace("Count of profile entries found directly in the registry: %ld\n", dwValCount);
-    if (dwValCount<1) return;
 
     for (i = 0; i<dwValCount; i++) 
     {
         dwNameLen = sizeof(szName);
         dwDataLen = sizeof(szData);
         res = RegEnumValueA( hkIcmKey, i, szName, &dwNameLen, NULL, &dwType, (LPBYTE)szData, &dwDataLen );
-        if (res != ERROR_SUCCESS) break;
+        if (res != ERROR_SUCCESS) 
+        {
+            trace("RegEnumValueA() failed (%ld), cannot enumerate profiles\n", res);
+            break;
+        }
         ok( dwType == REG_SZ, "RegEnumValueA() returned unexpected value type (%ld)\n", dwType );
         if (dwType != REG_SZ) break;
         trace(" found '%s' value containing '%s' (%d chars)\n", szName, szData, strlen(szData));




More information about the wine-cvs mailing list