Skip to content

Commit f863d82

Browse files
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
1 parent f0a94d8 commit f863d82

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/test/regress/pg_regress.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,6 @@ spawn_process(const char *cmdline)
12261226
#else
12271227
PROCESS_INFORMATION pi;
12281228
char *cmdline2;
1229-
HANDLE restrictedToken;
12301229
const char *comspec;
12311230

12321231
/* Find CMD.EXE location using COMSPEC, if it's set */
@@ -1237,8 +1236,7 @@ spawn_process(const char *cmdline)
12371236
memset(&pi, 0, sizeof(pi));
12381237
cmdline2 = psprintf("\"%s\" /c \"%s\"", comspec, cmdline);
12391238

1240-
if ((restrictedToken =
1241-
CreateRestrictedProcess(cmdline2, &pi)) == 0)
1239+
if (!CreateRestrictedProcess(cmdline2, &pi))
12421240
exit(2);
12431241

12441242
CloseHandle(pi.hThread);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy