summaryrefslogtreecommitdiff
path: root/games/hack
diff options
context:
space:
mode:
authormestre <mestre@cvs.openbsd.org>2016-03-15 19:56:21 +0000
committermestre <mestre@cvs.openbsd.org>2016-03-15 19:56:21 +0000
commit6ff120d1f244819f4d704b0a461af8f88f264752 (patch)
tree6fe71eb3c3afe6b4b3aba8d2afc8b2502862f615 /games/hack
parent4e30aae939ed32fad39ab5133e9c9fd9acb5c897 (diff)
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@
Diffstat (limited to 'games/hack')
-rw-r--r--games/hack/hack.pager.c8
-rw-r--r--games/hack/hack.unix.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/games/hack/hack.pager.c b/games/hack/hack.pager.c
index 748599a3519..8dd8b3a0045 100644
--- a/games/hack/hack.pager.c
+++ b/games/hack/hack.pager.c
@@ -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);
}
diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c
index c53003bd1b9..92f6f754cb5 100644
--- a/games/hack/hack.unix.c
+++ b/games/hack/hack.unix.c
@@ -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 */