summaryrefslogtreecommitdiff
path: root/ares/ares_gethostbyname.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-21 22:38:45 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-21 22:38:45 +0000
commita71280800690dbf6732fd096816aa14ceea5cd93 (patch)
treeb629f70222adfce08678fd49f46e3e80e2d371ae /ares/ares_gethostbyname.c
parente19c2037282b239494c763d1ee46eb92df89903a (diff)
downloadcurl-a71280800690dbf6732fd096816aa14ceea5cd93.tar.gz
the same fix here too, typecast to prevent win32 compiler warning
Diffstat (limited to 'ares/ares_gethostbyname.c')
-rw-r--r--ares/ares_gethostbyname.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c
index e03b343f1..fddfda7d6 100644
--- a/ares/ares_gethostbyname.c
+++ b/ares/ares_gethostbyname.c
@@ -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);