diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-03-17 19:40:44 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-03-17 19:40:44 +0000 |
commit | d56c7210e6997f393bece0935d359c05d01a0efa (patch) | |
tree | 9807932348e40879566df0fc405cff1a547d791d /usr.sbin/pppd | |
parent | e3a77a309cd3e34064bed90fbff49f7c78cfb732 (diff) |
Last parameter to execl[e]() functions *must* be cast to a pointer.
Just NULL is not good practise as NULL is theoretically allowed to
be an integer rather than a pointer.
Use (char *)NULL consistently instead of scattering a few (char *)0
and (void *)NULL into the mix.
Prompted by and probably ok deraadt@ millert@ kettenis@
Definitely ok mestre@ ratchov@
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r-- | usr.sbin/pppd/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c index 9b2179e2ed2..99d4e932b11 100644 --- a/usr.sbin/pppd/main.c +++ b/usr.sbin/pppd/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.53 2015/12/06 12:00:16 tobias Exp $ */ +/* $OpenBSD: main.c,v 1.54 2016/03/17 19:40:43 krw Exp $ */ /* * main.c - Point-to-Point Protocol main module @@ -1101,7 +1101,7 @@ device_script(program, in, out) _exit(1); } - execl("/bin/sh", "sh", "-c", program, (char *)0); + execl("/bin/sh", "sh", "-c", program, (char *)NULL); syslog(LOG_ERR, "could not exec /bin/sh: %m"); _exit(99); /* NOTREACHED */ |