From 96e9a65e99f187dbe1066b6d2cd85ec0f94a0e55 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 4 Apr 2005 13:44:45 +0000 Subject: [PATCH] NULL needs to be cast to void * when passed to a variadic function like execl(). Spotted by Damien Miller. [originally from svn r5592] --- unix/uxproxy.c | 2 +- unix/uxpty.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/uxproxy.c b/unix/uxproxy.c index 617f5ccf..209991fc 100644 --- a/unix/uxproxy.c +++ b/unix/uxproxy.c @@ -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); } diff --git a/unix/uxpty.c b/unix/uxpty.c index f91dc716..37a017d3 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -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); } /* -- 2.45.2