mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-13 03:40:44 +02:00
hw/xwin: Fix shadowed local variable i in HandleCustomWM_COMMAND()
Fix shadowed local variable i in HandleCustomWM_COMMAND() Also, fds are meant to be representable as an int winprefs.c: In function ‘HandleCustomWM_COMMAND’: winprefs.c:346:23: error: declaration of ‘i’ shadows a previous local winprefs.c:322:7: error: shadowed declaration is here Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
b55d0b92fc
commit
97c9ed026a
1 changed files with 3 additions and 3 deletions
|
|
@ -327,12 +327,12 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
|
|||
case CMD_EXEC:
|
||||
if (fork() == 0) {
|
||||
struct rlimit rl;
|
||||
unsigned long i;
|
||||
int fd;
|
||||
|
||||
/* Close any open descriptors except for STD* */
|
||||
getrlimit(RLIMIT_NOFILE, &rl);
|
||||
for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++)
|
||||
close(i);
|
||||
for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++)
|
||||
close(fd);
|
||||
|
||||
/* Disassociate any TTYs */
|
||||
setsid();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue