]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
the same fix here too, typecast to prevent win32 compiler warning
authorDaniel Stenberg <daniel@haxx.se>
Mon, 21 Mar 2005 22:38:45 +0000 (22:38 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 Mar 2005 22:38:45 +0000 (22:38 +0000)
ares/ares_gethostbyname.c

index e03b343f186f5878a4a738f22757b3209960efec..fddfda7d66ecd04503e55e5fc2f734c6c233391a 100644 (file)
@@ -222,18 +222,18 @@ static int file_lookup(const char *name, struct hostent **host)
 #ifdef WIN32
   char PATH_HOSTS[MAX_PATH];
   if (IS_NT()) {
-        char tmp[MAX_PATH];
-        HKEY hkeyHosts;
+    char tmp[MAX_PATH];
+    HKEY hkeyHosts;
 
-        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
-                == ERROR_SUCCESS)
-        {
-                DWORD dwLength = MAX_PATH;
-                RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, tmp,
-                        &dwLength);
-                ExpandEnvironmentStrings(tmp, PATH_HOSTS, MAX_PATH);
-                RegCloseKey(hkeyHosts);
-        }
+    if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
+        == ERROR_SUCCESS)
+    {
+      DWORD dwLength = MAX_PATH;
+      RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
+                      &dwLength);
+      ExpandEnvironmentStrings(tmp, PATH_HOSTS, MAX_PATH);
+      RegCloseKey(hkeyHosts);
+    }
   }
   else
     GetWindowsDirectory(PATH_HOSTS, MAX_PATH);