Skip to content
Snippets Groups Projects
Commit e19c2037 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

typecase to fix win32 compiler warning (and intended as other code is)

parent 8817779f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment