]> granicus.if.org Git - curl/commitdiff
typecase to fix win32 compiler warning (and intended as other code is)
authorDaniel Stenberg <daniel@haxx.se>
Mon, 21 Mar 2005 22:37:18 +0000 (22:37 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 Mar 2005 22:37:18 +0000 (22:37 +0000)
ares/ares_gethostbyaddr.c

index b33086c01f0e67eb79eb437ca971e050932868a5..265b89d240e6b7bad2946b4f0c7dbc373de9b86e 100644 (file)
@@ -147,21 +147,20 @@ static int file_lookup(struct in_addr *addr, struct hostent **host)
   int status;
 
 #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);