Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src NULL does not need a cast
details: https://anonhg.NetBSD.org/src/rev/530cf0b83956
branches: trunk
changeset: 769106:530cf0b83956
user: plunky <plunky%NetBSD.org@localhost>
date: Wed Aug 31 16:24:54 2011 +0000
description:
NULL does not need a cast
diffstat:
bin/csh/func.c | 6 ++--
bin/ksh/c_ksh.c | 6 ++--
bin/ksh/c_sh.c | 6 ++--
bin/ksh/history.c | 6 ++--
bin/pax/ar_io.c | 4 +-
bin/pax/ar_subs.c | 20 ++++++++--------
bin/pax/options.c | 6 ++--
bin/pax/sel_subs.c | 10 ++++----
bin/sh/cd.c | 8 +++---
bin/sh/eval.c | 6 ++--
bin/sh/expand.c | 8 +++---
bin/sh/parser.c | 8 +++---
bin/sh/redir.c | 6 ++--
games/adventure/init.c | 6 ++--
games/arithmetic/arithmetic.c | 6 ++--
games/boggle/boggle/help.c | 6 ++--
games/boggle/boggle/mach.c | 6 ++--
games/ching/printching/printching.c | 16 ++++++------
games/cribbage/instr.c | 6 ++--
games/fish/fish.c | 8 +++---
games/fortune/strfile/strfile.c | 6 ++--
games/hack/hack.pager.c | 10 ++++----
games/hack/hack.unix.c | 6 ++--
games/hunt/hunt/hunt.c | 8 +++---
games/hunt/huntd/driver.c | 12 ++++----
games/hunt/huntd/execute.c | 7 ++---
games/hunt/huntd/shots.c | 8 +++---
games/mille/mille.c | 6 ++--
games/mille/move.c | 6 ++--
games/mille/varpush.c | 6 ++--
games/phantasia/misc.c | 4 +-
games/rogue/machdep.c | 6 ++--
games/tetris/tetris.c | 4 +-
games/worms/worms.c | 6 ++--
games/wump/wump.c | 6 ++--
usr.bin/chpass/chpass.c | 6 ++--
usr.bin/chpass/edit.c | 6 ++--
usr.bin/col/col.c | 6 ++--
usr.bin/find/ls.c | 6 ++--
usr.bin/grep/queue.c | 6 ++--
usr.bin/login/login.c | 6 ++--
usr.bin/make/parse.c | 10 ++++----
usr.bin/msgs/msgs.c | 6 ++--
usr.bin/passwd/local_passwd.c | 8 +++---
usr.bin/radioctl/radioctl.c | 6 ++--
usr.bin/rpcgen/rpc_cout.c | 6 ++--
usr.bin/rpcgen/rpc_main.c | 6 ++--
usr.bin/rpcgen/rpc_svcout.c | 14 +++++-----
usr.bin/rpcgen/rpc_tblout.c | 6 ++--
usr.bin/rpcgen/rpc_util.c | 6 ++--
usr.bin/sdiff/edit.c | 4 +-
usr.bin/shlock/shlock.c | 18 +++++++-------
usr.bin/su/su.c | 6 ++--
usr.bin/talk/get_addrs.c | 8 +++---
usr.bin/time/time.c | 8 +++---
usr.bin/write/write.c | 6 ++--
usr.sbin/bad144/bad144.c | 8 +++---
usr.sbin/isdn/isdnd/log.c | 4 +-
usr.sbin/isdn/isdnd/main.c | 8 +++---
usr.sbin/isdn/isdnd/process.c | 4 +-
usr.sbin/isdn/isdntrace/trace.c | 12 ++++----
usr.sbin/lpr/lpc/cmds.c | 6 ++--
usr.sbin/mrouted/kern.c | 6 ++--
usr.sbin/mrouted/main.c | 8 +++---
usr.sbin/pwd_mkdb/pwd_mkdb.c | 8 +++---
usr.sbin/route6d/route6d.c | 8 +++---
usr.sbin/rpc.pcnfsd/pcnfsd_misc.c | 22 ++++++++--------
usr.sbin/rpc.pcnfsd/pcnfsd_v1.c | 4 +-
usr.sbin/rpc.pcnfsd/pcnfsd_v2.c | 4 +-
usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c | 6 ++--
usr.sbin/rpcbind/rpcb_svc.c | 4 +-
usr.sbin/rpcbind/rpcb_svc_4.c | 5 +--
usr.sbin/rpcbind/rpcb_svc_com.c | 14 +++++-----
usr.sbin/rpcbind/rpcbind.c | 4 +-
usr.sbin/sup/source/scan.c | 18 +++++++-------
usr.sbin/sup/source/scm.c | 4 +-
usr.sbin/sup/source/scmio.c | 4 +-
usr.sbin/sup/source/supcmain.c | 4 +-
usr.sbin/sup/source/supcmeat.c | 42 +++++++++++++++++-----------------
usr.sbin/sup/source/supcmisc.c | 4 +-
usr.sbin/sup/source/supfilesrv.c | 34 +++++++++++++-------------
usr.sbin/sup/source/supmsg.c | 18 +++++++-------
usr.sbin/sup/source/supscan.c | 11 ++++----
usr.sbin/syslogd/syslogd.c | 6 ++--
usr.sbin/tcpdchk/inetcf.c | 6 ++--
usr.sbin/user/defs.h | 6 ++--
usr.sbin/vipw/vipw.c | 6 ++--
87 files changed, 352 insertions(+), 355 deletions(-)
diffs (truncated from 3081 to 300 lines):
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/csh/func.c
--- a/bin/csh/func.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/csh/func.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.37 2009/03/29 01:02:48 mrg Exp $ */
+/* $NetBSD: func.c,v 1.38 2011/08/31 16:24:54 plunky Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: func.c,v 1.37 2009/03/29 01:02:48 mrg Exp $");
+__RCSID("$NetBSD: func.c,v 1.38 2011/08/31 16:24:54 plunky Exp $");
#endif
#endif /* not lint */
@@ -1121,7 +1121,7 @@
{
const struct limits *lp, *res;
- res = (struct limits *) NULL;
+ res = NULL;
for (lp = limits; lp->limconst >= 0; lp++)
if (prefix(cp, str2short(lp->limname))) {
if (res)
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/ksh/c_ksh.c
--- a/bin/ksh/c_ksh.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/ksh/c_ksh.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_ksh.c,v 1.16 2009/04/25 05:11:37 lukem Exp $ */
+/* $NetBSD: c_ksh.c,v 1.17 2011/08/31 16:24:54 plunky Exp $ */
/*
* built-in Korn commands: c_*
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.16 2009/04/25 05:11:37 lukem Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.17 2011/08/31 16:24:54 plunky Exp $");
#endif
#include "sh.h"
@@ -1439,7 +1439,7 @@
wp += builtin_opt.optind;
if (*wp == NULL) /* list all */
- rv = x_bind((char*)NULL, (char*)NULL, 0, list);
+ rv = x_bind(NULL, NULL, 0, list);
for (; *wp != NULL; wp++) {
cp = strchr(*wp, '=');
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/ksh/c_sh.c
--- a/bin/ksh/c_sh.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/ksh/c_sh.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_sh.c,v 1.13 2009/04/25 05:11:37 lukem Exp $ */
+/* $NetBSD: c_sh.c,v 1.14 2011/08/31 16:24:54 plunky Exp $ */
/*
* built-in Bourne commands
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.13 2009/04/25 05:11:37 lukem Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.14 2011/08/31 16:24:54 plunky Exp $");
#endif
@@ -697,7 +697,7 @@
}
unset(vp, strchr(id, '[') ? 1 : 0);
} else { /* unset function */
- if (define(id, (struct op *) NULL))
+ if (define(id, NULL))
ret = 1;
}
return ret;
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/ksh/history.c
--- a/bin/ksh/history.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/ksh/history.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: history.c,v 1.10 2009/10/31 21:54:01 dsl Exp $ */
+/* $NetBSD: history.c,v 1.11 2011/08/31 16:24:54 plunky Exp $ */
/*
* command history
@@ -19,7 +19,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: history.c,v 1.10 2009/10/31 21:54:01 dsl Exp $");
+__RCSID("$NetBSD: history.c,v 1.11 2011/08/31 16:24:54 plunky Exp $");
#endif
@@ -604,7 +604,7 @@
void
init_histvec()
{
- if (histlist == (char **)NULL) {
+ if (histlist == NULL) {
histsize = HISTORYSIZE;
histlist = (char **)alloc(histsize*sizeof (char *), APERM);
histptr = histlist - 1;
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/pax/ar_io.c
--- a/bin/pax/ar_io.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/pax/ar_io.c Wed Aug 31 16:24:54 2011 +0000
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.52 2010/08/31 05:07:09 enami Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.53 2011/08/31 16:24:54 plunky Exp $");
#endif
#endif /* not lint */
@@ -1431,7 +1431,7 @@
if (sigprocmask(SIG_BLOCK, &s_mask, &o_mask) < 0)
syswarn(0, errno, "Unable to set signal mask");
ar_close();
- if (sigprocmask(SIG_SETMASK, &o_mask, (sigset_t *)NULL) < 0)
+ if (sigprocmask(SIG_SETMASK, &o_mask, NULL) < 0)
syswarn(0, errno, "Unable to restore signal mask");
if (done || !wr_trail || force_one_volume)
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/pax/ar_subs.c
--- a/bin/pax/ar_subs.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/pax/ar_subs.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_subs.c,v 1.55 2009/02/14 08:10:06 lukem Exp $ */
+/* $NetBSD: ar_subs.c,v 1.56 2011/08/31 16:24:54 plunky Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_subs.c,v 1.55 2009/02/14 08:10:06 lukem Exp $");
+__RCSID("$NetBSD: ar_subs.c,v 1.56 2011/08/31 16:24:54 plunky Exp $");
#endif
#endif /* not lint */
@@ -211,7 +211,7 @@
((*frmt->st_rd)() < 0))
return 1;
- now = time((time_t *)NULL);
+ now = time(NULL);
/*
* step through the archive until the format says it is done
@@ -277,7 +277,7 @@
* the patterns supplied by the user were all matched
*/
(void)(*frmt->end_rd)();
- (void)sigprocmask(SIG_BLOCK, &s_mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
ar_close();
pat_chk();
@@ -310,7 +310,7 @@
((*frmt->st_rd)() < 0) || (dir_start() < 0))
return 1;
- now = time((time_t *)NULL);
+ now = time(NULL);
#if !HAVE_NBTOOL_CONFIG_H
if (do_chroot)
(void)fdochroot(cwdfd);
@@ -519,7 +519,7 @@
* to avoid chance for multiple entry into the cleanup code.
*/
(void)(*frmt->end_rd)();
- (void)sigprocmask(SIG_BLOCK, &s_mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
ar_close();
proc_dir();
pat_chk();
@@ -558,7 +558,7 @@
return 1;
wrf = frmt->wr;
- now = time((time_t *)NULL);
+ now = time(NULL);
/*
* When we are doing interactive rename, we store the mapping of names
@@ -721,7 +721,7 @@
(*frmt->end_wr)();
wr_fin();
}
- (void)sigprocmask(SIG_BLOCK, &s_mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
ar_close();
if (tflag)
proc_dir();
@@ -887,7 +887,7 @@
* not truncate the archive).
*/
wr_fin();
- (void)sigprocmask(SIG_BLOCK, &s_mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
ar_close();
}
return res;
@@ -1148,7 +1148,7 @@
* patterns were selected block off signals to avoid chance for
* multiple entry into the cleanup code.
*/
- (void)sigprocmask(SIG_BLOCK, &s_mask, (sigset_t *)NULL);
+ (void)sigprocmask(SIG_BLOCK, &s_mask, NULL);
ar_close();
proc_dir();
ftree_chk();
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/pax/options.c
--- a/bin/pax/options.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/pax/options.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.111 2011/08/29 14:47:47 joerg Exp $ */
+/* $NetBSD: options.c,v 1.112 2011/08/31 16:24:54 plunky Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: options.c,v 1.111 2011/08/29 14:47:47 joerg Exp $");
+__RCSID("$NetBSD: options.c,v 1.112 2011/08/31 16:24:54 plunky Exp $");
#endif
#endif /* not lint */
@@ -1371,7 +1371,7 @@
maxflt = 0;
break;
}
- if (!fstdin && ((arcname == (char *)NULL) || (*arcname == '\0'))) {
+ if (!fstdin && ((arcname == NULL) || (*arcname == '\0'))) {
arcname = getenv("TAPE");
if ((arcname == NULL) || (*arcname == '\0'))
arcname = _PATH_DEFTAPE;
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/pax/sel_subs.c
--- a/bin/pax/sel_subs.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/pax/sel_subs.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sel_subs.c,v 1.23 2009/12/21 12:44:48 christos Exp $ */
+/* $NetBSD: sel_subs.c,v 1.24 2011/08/31 16:24:54 plunky Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)sel_subs.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: sel_subs.c,v 1.23 2009/12/21 12:44:48 christos Exp $");
+__RCSID("$NetBSD: sel_subs.c,v 1.24 2011/08/31 16:24:54 plunky Exp $");
#endif
#endif /* not lint */
@@ -147,7 +147,7 @@
}
uid = (uid_t)pw->pw_uid;
} else
- uid = (uid_t)strtoul(str+1, (char **)NULL, 10);
+ uid = (uid_t)strtoul(str+1, NULL, 10);
endpwent();
/*
@@ -246,7 +246,7 @@
}
gid = (gid_t)gr->gr_gid;
} else
- gid = (gid_t)strtoul(str+1, (char **)NULL, 10);
+ gid = (gid_t)strtoul(str+1, NULL, 10);
endgrent();
/*
@@ -414,7 +414,7 @@
/*
* start off with the current time
*/
- pt->low_time = pt->high_time = time((time_t *)NULL);
+ pt->low_time = pt->high_time = time(NULL);
if (*str != '\0') {
/*
* add lower limit
diff -r aebd59bbd5a5 -r 530cf0b83956 bin/sh/cd.c
--- a/bin/sh/cd.c Wed Aug 31 16:09:55 2011 +0000
+++ b/bin/sh/cd.c Wed Aug 31 16:24:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.43 2011/06/18 21:18:46 christos Exp $ */
+/* $NetBSD: cd.c,v 1.44 2011/08/31 16:24:54 plunky Exp $ */
/*-
* Copyright (c) 1991, 1993
Home |
Main Index |
Thread Index |
Old Index