mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
the same fix here too, typecast to prevent win32 compiler warning
This commit is contained in:
parent
e19c203728
commit
a712808006
@ -222,18 +222,18 @@ static int file_lookup(const char *name, struct hostent **host)
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char PATH_HOSTS[MAX_PATH];
|
char PATH_HOSTS[MAX_PATH];
|
||||||
if (IS_NT()) {
|
if (IS_NT()) {
|
||||||
char tmp[MAX_PATH];
|
char tmp[MAX_PATH];
|
||||||
HKEY hkeyHosts;
|
HKEY hkeyHosts;
|
||||||
|
|
||||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
|
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, &hkeyHosts)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DWORD dwLength = MAX_PATH;
|
DWORD dwLength = MAX_PATH;
|
||||||
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, tmp,
|
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
|
||||||
&dwLength);
|
&dwLength);
|
||||||
ExpandEnvironmentStrings(tmp, PATH_HOSTS, MAX_PATH);
|
ExpandEnvironmentStrings(tmp, PATH_HOSTS, MAX_PATH);
|
||||||
RegCloseKey(hkeyHosts);
|
RegCloseKey(hkeyHosts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
GetWindowsDirectory(PATH_HOSTS, MAX_PATH);
|
GetWindowsDirectory(PATH_HOSTS, MAX_PATH);
|
||||||
|
Loading…
Reference in New Issue
Block a user