the same fix here too, typecast to prevent win32 compiler warning

This commit is contained in:
Daniel Stenberg 2005-03-21 22:38:45 +00:00
parent e19c203728
commit a712808006
1 changed files with 11 additions and 11 deletions

View 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);