setupapi: Avoid shadowing a parameter.
This commit is contained in:
parent
3631ee051e
commit
a326c9ee67
|
@ -532,7 +532,7 @@ static BOOL do_register_dll( const struct register_dll_info *info, const WCHAR *
|
||||||
{
|
{
|
||||||
/* file is an executable, not a dll */
|
/* file is an executable, not a dll */
|
||||||
STARTUPINFOW startup;
|
STARTUPINFOW startup;
|
||||||
PROCESS_INFORMATION info;
|
PROCESS_INFORMATION process_info;
|
||||||
WCHAR *cmd_line;
|
WCHAR *cmd_line;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
static const WCHAR format[] = {'"','%','s','"',' ','%','s',0};
|
static const WCHAR format[] = {'"','%','s','"',' ','%','s',0};
|
||||||
|
@ -546,7 +546,7 @@ static BOOL do_register_dll( const struct register_dll_info *info, const WCHAR *
|
||||||
memset( &startup, 0, sizeof(startup) );
|
memset( &startup, 0, sizeof(startup) );
|
||||||
startup.cb = sizeof(startup);
|
startup.cb = sizeof(startup);
|
||||||
TRACE( "executing %s\n", debugstr_w(cmd_line) );
|
TRACE( "executing %s\n", debugstr_w(cmd_line) );
|
||||||
res = CreateProcessW( NULL, cmd_line, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info );
|
res = CreateProcessW( NULL, cmd_line, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &process_info );
|
||||||
HeapFree( GetProcessHeap(), 0, cmd_line );
|
HeapFree( GetProcessHeap(), 0, cmd_line );
|
||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
|
@ -554,16 +554,16 @@ static BOOL do_register_dll( const struct register_dll_info *info, const WCHAR *
|
||||||
status.Win32Error = GetLastError();
|
status.Win32Error = GetLastError();
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
CloseHandle( info.hThread );
|
CloseHandle( process_info.hThread );
|
||||||
|
|
||||||
if (WaitForSingleObject( info.hProcess, timeout*1000 ) == WAIT_TIMEOUT)
|
if (WaitForSingleObject( process_info.hProcess, timeout*1000 ) == WAIT_TIMEOUT)
|
||||||
{
|
{
|
||||||
/* timed out, kill the process */
|
/* timed out, kill the process */
|
||||||
TerminateProcess( info.hProcess, 1 );
|
TerminateProcess( process_info.hProcess, 1 );
|
||||||
status.FailureCode = SPREG_TIMEOUT;
|
status.FailureCode = SPREG_TIMEOUT;
|
||||||
status.Win32Error = ERROR_TIMEOUT;
|
status.Win32Error = ERROR_TIMEOUT;
|
||||||
}
|
}
|
||||||
CloseHandle( info.hProcess );
|
CloseHandle( process_info.hProcess );
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue