1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

execl(3) calls must have the last argument casted to (char *)NULL

At the time when this was commited me and tb@ discussed that it shouldn't be
changed, but still snucked in within a larger diff that we didn't notice.

OK tb@
This commit is contained in:
mestre 2016-03-15 19:56:20 +00:00
parent 55a685f0d9
commit 64f0fa1112
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: hack.pager.c,v 1.23 2016/01/09 21:54:11 mestre Exp $ */
/* $OpenBSD: hack.pager.c,v 1.24 2016/03/15 19:56:20 mestre Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@ -383,7 +383,7 @@ page_file(char *fnam, boolean silent)
if(dup(fd)) {
if(!silent) printf("Cannot open %s as stdin.\n", fnam);
} else {
execlp(catmore, basename(catmore), NULL);
execlp(catmore, basename(catmore), (char *)NULL);
if(!silent) printf("Cannot exec %s.\n", catmore);
}
exit(1);
@ -417,9 +417,9 @@ dosh(void)
if(child(0)) {
if ((str = getenv("SHELL")))
execlp(str, str, NULL);
execlp(str, str, (char *)NULL);
else
execl("/bin/sh", "sh", NULL);
execl("/bin/sh", "sh", (char *)NULL);
pline("sh: cannot execute.");
exit(1);
}

View File

@ -1,4 +1,4 @@
/* $OpenBSD: hack.unix.c,v 1.18 2016/01/09 21:54:11 mestre Exp $ */
/* $OpenBSD: hack.unix.c,v 1.19 2016/03/15 19:56:20 mestre Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@ -471,7 +471,7 @@ readmail(void)
if(!(mr = getenv("MAILREADER")))
mr = DEF_MAILREADER;
if(child(1)){
execl(mr, mr, NULL);
execl(mr, mr, (char *)NULL);
exit(1);
}
#else /* DEF_MAILREADER */