Module Name: src
Committed By: plunky
Date: Thu Sep 1 07:18:51 UTC 2011
Modified Files:
src/games/cribbage: instr.c
src/games/fish: fish.c
src/games/hack: hack.pager.c hack.unix.c
src/games/hunt/hunt: hunt.c
src/games/phantasia: misc.c
src/games/rogue: machdep.c
src/games/wump: wump.c
src/usr.bin/sdiff: edit.c
src/usr.sbin/rpc.pcnfsd: pcnfsd_misc.c
Log Message:
reinstate NULL cast by request, where the NULL was being passed as a vararg
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/games/cribbage/instr.c
cvs rdiff -u -r1.21 -r1.22 src/games/fish/fish.c
cvs rdiff -u -r1.20 -r1.21 src/games/hack/hack.pager.c
cvs rdiff -u -r1.16 -r1.17 src/games/hack/hack.unix.c
cvs rdiff -u -r1.40 -r1.41 src/games/hunt/hunt/hunt.c
cvs rdiff -u -r1.20 -r1.21 src/games/phantasia/misc.c
cvs rdiff -u -r1.18 -r1.19 src/games/rogue/machdep.c
cvs rdiff -u -r1.28 -r1.29 src/games/wump/wump.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/sdiff/edit.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/cribbage/instr.c
diff -u src/games/cribbage/instr.c:1.13 src/games/cribbage/instr.c:1.14
--- src/games/cribbage/instr.c:1.13 Wed Aug 31 16:24:55 2011
+++ src/games/cribbage/instr.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: instr.c,v 1.13 2011/08/31 16:24:55 plunky Exp $ */
+/* $NetBSD: instr.c,v 1.14 2011/09/01 07:18:50 plunky Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)instr.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: instr.c,v 1.13 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: instr.c,v 1.14 2011/09/01 07:18:50 plunky Exp $");
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@
warn("dup2");
_exit(1);
}
- execl("/bin/sh", "sh", "-c", path, NULL);
+ execl("/bin/sh", "sh", "-c", path, (char *) NULL);
warn(NULL);
_exit(1);
default:
Index: src/games/fish/fish.c
diff -u src/games/fish/fish.c:1.21 src/games/fish/fish.c:1.22
--- src/games/fish/fish.c:1.21 Wed Aug 31 16:24:55 2011
+++ src/games/fish/fish.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: fish.c,v 1.21 2011/08/31 16:24:55 plunky Exp $ */
+/* $NetBSD: fish.c,v 1.22 2011/09/01 07:18:50 plunky Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: fish.c,v 1.21 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: fish.c,v 1.22 2011/09/01 07:18:50 plunky Exp $");
#endif
#endif /* not lint */
@@ -456,7 +456,7 @@
err(1, "open %s", _PATH_INSTR);
if (dup2(fd, 0) == -1)
err(1, "dup2");
- (void)execl("/bin/sh", "sh", "-c", pager, NULL);
+ (void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL);
err(1, "exec sh -c %s", pager);
/*NOTREACHED*/
case -1:
Index: src/games/hack/hack.pager.c
diff -u src/games/hack/hack.pager.c:1.20 src/games/hack/hack.pager.c:1.21
--- src/games/hack/hack.pager.c:1.20 Wed Aug 31 16:24:56 2011
+++ src/games/hack/hack.pager.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.pager.c,v 1.20 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: hack.pager.c,v 1.21 2011/09/01 07:18:50 plunky Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.20 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.21 2011/09/01 07:18:50 plunky Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
@@ -392,7 +392,7 @@
if (!silent)
printf("Cannot open %s as stdin.\n", fnam);
} else {
- execl(catmore, "page", NULL);
+ execl(catmore, "page", (char *)NULL);
if (!silent)
printf("Cannot exec %s.\n", catmore);
}
@@ -428,9 +428,9 @@
char *str;
if (child(0)) {
if ((str = getenv("SHELL")) != NULL)
- execl(str, str, NULL);
+ execl(str, str, (char *)NULL);
else
- execl("/bin/sh", "sh", NULL);
+ execl("/bin/sh", "sh", (char *)NULL);
pline("sh: cannot execute.");
exit(1);
}
Index: src/games/hack/hack.unix.c
diff -u src/games/hack/hack.unix.c:1.16 src/games/hack/hack.unix.c:1.17
--- src/games/hack/hack.unix.c:1.16 Wed Aug 31 16:24:56 2011
+++ src/games/hack/hack.unix.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.unix.c,v 1.16 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: hack.unix.c,v 1.17 2011/09/01 07:18:50 plunky Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.unix.c,v 1.16 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: hack.unix.c,v 1.17 2011/09/01 07:18:50 plunky Exp $");
#endif /* not lint */
/* This file collects some Unix dependencies; hack.pager.c contains some more */
@@ -506,7 +506,7 @@
if (!(mr = getenv("MAILREADER")))
mr = DEF_MAILREADER;
if (child(1)) {
- execl(mr, mr, NULL);
+ execl(mr, mr, (char *)NULL);
exit(1);
}
#else /* DEF_MAILREADER */
Index: src/games/hunt/hunt/hunt.c
diff -u src/games/hunt/hunt/hunt.c:1.40 src/games/hunt/hunt/hunt.c:1.41
--- src/games/hunt/hunt/hunt.c:1.40 Wed Aug 31 16:24:56 2011
+++ src/games/hunt/hunt/hunt.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hunt.c,v 1.40 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: hunt.c,v 1.41 2011/09/01 07:18:50 plunky Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hunt.c,v 1.40 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: hunt.c,v 1.41 2011/09/01 07:18:50 plunky Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -624,10 +624,10 @@
#else
if (use_port == NULL)
#endif
- execl(Driver, "HUNT", NULL);
+ execl(Driver, "HUNT", (char *) NULL);
#ifdef INTERNET
else
- execl(Driver, "HUNT", "-p", use_port, NULL);
+ execl(Driver, "HUNT", "-p", use_port, (char *) NULL);
#endif
/* only get here if exec failed */
(void) kill(getppid(), SIGUSR1); /* tell mom */
Index: src/games/phantasia/misc.c
diff -u src/games/phantasia/misc.c:1.20 src/games/phantasia/misc.c:1.21
--- src/games/phantasia/misc.c:1.20 Wed Aug 31 16:24:56 2011
+++ src/games/phantasia/misc.c Thu Sep 1 07:18:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.20 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: misc.c,v 1.21 2011/09/01 07:18:50 plunky Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
@@ -682,7 +682,7 @@
if (ch == 'Y') {
cleanup(FALSE);
execl(_PATH_GAMEPROG, "phantasia", "-s",
- (Wizard ? "-S" : NULL), NULL);
+ (Wizard ? "-S" : (char *) NULL), (char *) NULL);
exit(0);
/* NOTREACHED */
}
Index: src/games/rogue/machdep.c
diff -u src/games/rogue/machdep.c:1.18 src/games/rogue/machdep.c:1.19
--- src/games/rogue/machdep.c:1.18 Wed Aug 31 16:24:56 2011
+++ src/games/rogue/machdep.c Thu Sep 1 07:18:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.18 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: machdep.c,v 1.19 2011/09/01 07:18:51 plunky Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: machdep.c,v 1.18 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: machdep.c,v 1.19 2011/09/01 07:18:51 plunky Exp $");
#endif
#endif /* not lint */
@@ -481,7 +481,7 @@
case -1:
break;
case 0:
- execl(shell, shell, NULL);
+ execl(shell, shell, (char *)NULL);
_exit(255);
default:
waitpid(pid, &w, 0);
Index: src/games/wump/wump.c
diff -u src/games/wump/wump.c:1.28 src/games/wump/wump.c:1.29
--- src/games/wump/wump.c:1.28 Wed Aug 31 16:24:57 2011
+++ src/games/wump/wump.c Thu Sep 1 07:18:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: wump.c,v 1.28 2011/08/31 16:24:57 plunky Exp $ */
+/* $NetBSD: wump.c,v 1.29 2011/09/01 07:18:51 plunky Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: wump.c,v 1.28 2011/08/31 16:24:57 plunky Exp $");
+__RCSID("$NetBSD: wump.c,v 1.29 2011/09/01 07:18:51 plunky Exp $");
#endif
#endif /* not lint */
@@ -781,7 +781,7 @@
err(1, "open %s", _PATH_WUMPINFO);
if (dup2(fd, STDIN_FILENO) == -1)
err(1, "dup2");
- (void)execl("/bin/sh", "sh", "-c", pager, NULL);
+ (void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL);
err(1, "exec sh -c %s", pager);
case -1:
err(1, "fork");
Index: src/usr.bin/sdiff/edit.c
diff -u src/usr.bin/sdiff/edit.c:1.3 src/usr.bin/sdiff/edit.c:1.4
--- src/usr.bin/sdiff/edit.c:1.3 Wed Aug 31 16:24:58 2011
+++ src/usr.bin/sdiff/edit.c Thu Sep 1 07:18:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: edit.c,v 1.3 2011/08/31 16:24:58 plunky Exp $ */
+/* $NetBSD: edit.c,v 1.4 2011/09/01 07:18:51 plunky Exp $ */
/* $OpenBSD: edit.c,v 1.14 2006/05/25 03:20:32 ray Exp $ */
/*
@@ -41,7 +41,7 @@
switch (pid = fork()) {
case 0:
/* child */
- execlp(editor, editor, filename, NULL);
+ execlp(editor, editor, filename, (void *)NULL);
warn("could not execute editor: %s", editor);
cleanup(filename);
case -1:
Index: src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c
diff -u src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.13 src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.14
--- src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c:1.13 Wed Aug 31 16:24:59 2011
+++ src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c Thu Sep 1 07:18:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pcnfsd_misc.c,v 1.13 2011/08/31 16:24:59 plunky Exp $ */
+/* $NetBSD: pcnfsd_misc.c,v 1.14 2011/09/01 07:18:51 plunky Exp $ */
/* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_misc.c 1.5 92/01/24 19:59:13 SMI */
/*
@@ -455,7 +455,7 @@
(void) setgid(cached_gid);
(void) setuid(cached_uid);
- (void) execl("/bin/sh", "sh", "-c", cmd, NULL);
+ (void) execl("/bin/sh", "sh", "-c", cmd, (char *) NULL);
_exit(255);
}
if (pid == -1) {