mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
pg_regress: Remove unused variable
The restrictedToken handle was set but never read, so remove the variable and change to a boolean style check to match other uses of CreateRestrictedProcess(). Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/62A63C81-3893-4E3F-A34E-2081DF67074E@yesql.se
This commit is contained in:
parent
f0a94d81e4
commit
f863d82b2f
@ -1226,7 +1226,6 @@ spawn_process(const char *cmdline)
|
|||||||
#else
|
#else
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
char *cmdline2;
|
char *cmdline2;
|
||||||
HANDLE restrictedToken;
|
|
||||||
const char *comspec;
|
const char *comspec;
|
||||||
|
|
||||||
/* Find CMD.EXE location using COMSPEC, if it's set */
|
/* Find CMD.EXE location using COMSPEC, if it's set */
|
||||||
@ -1237,8 +1236,7 @@ spawn_process(const char *cmdline)
|
|||||||
memset(&pi, 0, sizeof(pi));
|
memset(&pi, 0, sizeof(pi));
|
||||||
cmdline2 = psprintf("\"%s\" /c \"%s\"", comspec, cmdline);
|
cmdline2 = psprintf("\"%s\" /c \"%s\"", comspec, cmdline);
|
||||||
|
|
||||||
if ((restrictedToken =
|
if (!CreateRestrictedProcess(cmdline2, &pi))
|
||||||
CreateRestrictedProcess(cmdline2, &pi)) == 0)
|
|
||||||
exit(2);
|
exit(2);
|
||||||
|
|
||||||
CloseHandle(pi.hThread);
|
CloseHandle(pi.hThread);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user