1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-12 18:13:50 -05:00

NULL needs to be cast to void * when passed to a variadic function like

execl().  Spotted by Damien Miller.

[originally from svn r5592]
This commit is contained in:
Ben Harris 2005-04-04 13:44:45 +00:00
parent cf721acc1f
commit 96e9a65e99
2 changed files with 2 additions and 2 deletions

View File

@ -281,7 +281,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
close(i);
fcntl(0, F_SETFD, 0);
fcntl(1, F_SETFD, 0);
execl("/bin/sh", "sh", "-c", cmd, NULL);
execl("/bin/sh", "sh", "-c", cmd, (void *)NULL);
_exit(255);
}

View File

@ -813,7 +813,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
sprintf(shellname, "-%s", p);
} else
shellname = shell;
execl(getenv("SHELL"), shellname, NULL);
execl(getenv("SHELL"), shellname, (void *)NULL);
}
/*