Content-Length: 274367 | pFad | http://github.com/postgrespro/postgres/commit/f863d82b2f9801c556882ca92b519982a82133e3

9B pg_regress: Remove unused variable · postgrespro/postgres@f863d82 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f863d82b2f9801c556882ca92b519982a82133e3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy