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, here
details: https://anonhg.NetBSD.org/src/rev/e52a73de8c83
branches: trunk
changeset: 769629:e52a73de8c83
user: plunky <plunky%NetBSD.org@localhost>
date: Fri Sep 16 16:13:16 2011 +0000
description:
NULL does not need a cast, here
diffstat:
lib/libedit/filecomplete.c | 6 +++---
lib/libutil/login_tty.c | 6 +++---
libexec/atrun/atrun.c | 6 +++---
libexec/ftpd/ftpcmd.y | 6 +++---
libexec/ftpd/ftpd.c | 6 +++---
libexec/ftpd/logutmp.c | 6 +++---
libexec/rlogind/rlogind.c | 6 +++---
libexec/rpc.rquotad/rquotad.c | 8 ++++----
libexec/rpc.rstatd/rstat_proc.c | 6 +++---
libexec/rpc.rwalld/rwalld.c | 6 +++---
libexec/rpc.sprayd/sprayd.c | 6 +++---
sbin/dump/tape.c | 6 +++---
sbin/fsck_ext2fs/setup.c | 6 +++---
sbin/ping6/ping6.c | 6 +++---
sbin/restore/symtab.c | 6 +++---
tests/fs/nfs/nfsservice/rpcbind/rpcb_svc.c | 4 ++--
tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_4.c | 5 ++---
tests/fs/nfs/nfsservice/rpcbind/rpcb_svc_com.c | 14 +++++++-------
tests/fs/nfs/nfsservice/rpcbind/rpcbind.c | 4 ++--
tests/lib/libc/regex/main.c | 10 +++++-----
20 files changed, 64 insertions(+), 65 deletions(-)
diffs (truncated from 574 to 300 lines):
diff -r fb24660025c1 -r e52a73de8c83 lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c Fri Sep 16 16:09:03 2011 +0000
+++ b/lib/libedit/filecomplete.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.30 2011/08/16 16:25:15 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.31 2011/09/16 16:13:16 plunky Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.30 2011/08/16 16:25:15 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.31 2011/09/16 16:13:16 plunky Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -333,7 +333,7 @@
match_list[0] = retstr;
/* add NULL as last pointer to the array */
- match_list[matches + 1] = (char *) NULL;
+ match_list[matches + 1] = NULL;
return match_list;
}
diff -r fb24660025c1 -r e52a73de8c83 lib/libutil/login_tty.c
--- a/lib/libutil/login_tty.c Fri Sep 16 16:09:03 2011 +0000
+++ b/lib/libutil/login_tty.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: login_tty.c,v 1.12 2008/02/09 05:07:26 dholland Exp $ */
+/* $NetBSD: login_tty.c,v 1.13 2011/09/16 16:13:16 plunky Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: login_tty.c,v 1.12 2008/02/09 05:07:26 dholland Exp $");
+__RCSID("$NetBSD: login_tty.c,v 1.13 2011/09/16 16:13:16 plunky Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -53,7 +53,7 @@
_DIAGASSERT(fd != -1);
(void) setsid();
- if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
+ if (ioctl(fd, TIOCSCTTY, NULL) == -1)
return (-1);
(void) dup2(fd, STDIN_FILENO);
(void) dup2(fd, STDOUT_FILENO);
diff -r fb24660025c1 -r e52a73de8c83 libexec/atrun/atrun.c
--- a/libexec/atrun/atrun.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/atrun/atrun.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atrun.c,v 1.20 2011/08/01 12:28:54 mbalmer Exp $ */
+/* $NetBSD: atrun.c,v 1.21 2011/09/16 16:13:17 plunky Exp $ */
/*
* atrun.c - run jobs queued by at; run with root privileges.
@@ -59,7 +59,7 @@
#if 0
static char rcsid[] = "$OpenBSD: atrun.c,v 1.7 1997/09/08 22:12:10 millert Exp $";
#else
-__RCSID("$NetBSD: atrun.c,v 1.20 2011/08/01 12:28:54 mbalmer Exp $");
+__RCSID("$NetBSD: atrun.c,v 1.21 2011/09/16 16:13:17 plunky Exp $");
#endif
static int debug = 0;
@@ -327,7 +327,7 @@
/* We're the parent. Let's wait. */
(void)close(fd_in);
(void)close(fd_out);
- (void)waitpid(pid, (int *)NULL, 0);
+ (void)waitpid(pid, NULL, 0);
/*
* Send mail. Unlink the output file first, so it is deleted
diff -r fb24660025c1 -r e52a73de8c83 libexec/ftpd/ftpcmd.y
--- a/libexec/ftpd/ftpcmd.y Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/ftpd/ftpcmd.y Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpcmd.y,v 1.92 2011/07/01 02:46:15 joerg Exp $ */
+/* $NetBSD: ftpcmd.y,v 1.93 2011/09/16 16:13:17 plunky Exp $ */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-__RCSID("$NetBSD: ftpcmd.y,v 1.92 2011/07/01 02:46:15 joerg Exp $");
+__RCSID("$NetBSD: ftpcmd.y,v 1.93 2011/09/16 16:13:17 plunky Exp $");
#endif
#endif /* not lint */
@@ -1633,7 +1633,7 @@
c = cmdp[cpos];
cmdp[cpos] = '\0';
yylval.u.i = atoi(cp);
- yylval.u.ll = STRTOLL(cp, (char **)NULL, 10);
+ yylval.u.ll = STRTOLL(cp, NULL, 10);
cmdp[cpos] = c;
return (NUMBER);
}
diff -r fb24660025c1 -r e52a73de8c83 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/ftpd/ftpd.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.196 2011/09/04 23:16:41 lukem Exp $ */
+/* $NetBSD: ftpd.c,v 1.197 2011/09/16 16:13:17 plunky Exp $ */
/*
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.196 2011/09/04 23:16:41 lukem Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.197 2011/09/16 16:13:17 plunky Exp $");
#endif
#endif /* not lint */
@@ -2547,7 +2547,7 @@
int ispassive, af;
off_t otbi, otbo, otb;
- a = p = (unsigned char *)NULL;
+ a = p = NULL;
reply(-211, "%s FTP server status:", hostname);
reply(0, "Version: %s", EMPTYSTR(version) ? "<suppressed>" : version);
diff -r fb24660025c1 -r e52a73de8c83 libexec/ftpd/logutmp.c
--- a/libexec/ftpd/logutmp.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/ftpd/logutmp.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: logutmp.c,v 1.11 2008/06/09 01:00:23 lukem Exp $ */
+/* $NetBSD: logutmp.c,v 1.12 2011/09/16 16:13:17 plunky Exp $ */
/*
* Portions Copyright (c) 1988, 1993
@@ -56,7 +56,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: logutmp.c,v 1.11 2008/06/09 01:00:23 lukem Exp $");
+__RCSID("$NetBSD: logutmp.c,v 1.12 2011/09/16 16:13:17 plunky Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -98,7 +98,7 @@
*/
if (topslot < 0) {
topslot = 0;
- while (getttyent() != (struct ttyent *)NULL)
+ while (getttyent() != NULL)
topslot++;
}
if ((topslot < 0) || ((fd < 0)
diff -r fb24660025c1 -r e52a73de8c83 libexec/rlogind/rlogind.c
--- a/libexec/rlogind/rlogind.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/rlogind/rlogind.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rlogind.c,v 1.40 2011/08/27 15:45:52 joerg Exp $ */
+/* $NetBSD: rlogind.c,v 1.41 2011/09/16 16:13:17 plunky Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -69,7 +69,7 @@
#if 0
static char sccsid[] = "@(#)rlogind.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: rlogind.c,v 1.40 2011/08/27 15:45:52 joerg Exp $");
+__RCSID("$NetBSD: rlogind.c,v 1.41 2011/09/16 16:13:17 plunky Exp $");
#endif
#endif /* not lint */
@@ -365,7 +365,7 @@
"Connection received using IP options (ignored):%s",
lbuf);
if (setsockopt(0, ipproto, IP_OPTIONS,
- (char *)NULL, optsize) != 0) {
+ NULL, optsize) != 0) {
syslog(LOG_ERR,
"setsockopt IP_OPTIONS NULL: %m");
exit(1);
diff -r fb24660025c1 -r e52a73de8c83 libexec/rpc.rquotad/rquotad.c
--- a/libexec/rpc.rquotad/rquotad.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/rpc.rquotad/rquotad.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rquotad.c,v 1.29 2011/08/30 17:06:20 plunky Exp $ */
+/* $NetBSD: rquotad.c,v 1.30 2011/09/16 16:13:17 plunky Exp $ */
/*
* by Manuel Bouyer (bouyer%ensta.fr@localhost). Public domain.
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rquotad.c,v 1.29 2011/08/30 17:06:20 plunky Exp $");
+__RCSID("$NetBSD: rquotad.c,v 1.30 2011/09/16 16:13:17 plunky Exp $");
#endif
#include <sys/param.h>
@@ -126,7 +126,7 @@
{
switch (request->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
break;
case RQUOTAPROC_GETQUOTA:
@@ -147,7 +147,7 @@
{
switch (request->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
break;
case RQUOTAPROC_GETQUOTA:
diff -r fb24660025c1 -r e52a73de8c83 libexec/rpc.rstatd/rstat_proc.c
--- a/libexec/rpc.rstatd/rstat_proc.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/rpc.rstatd/rstat_proc.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rstat_proc.c,v 1.45 2011/08/30 17:06:20 plunky Exp $ */
+/* $NetBSD: rstat_proc.c,v 1.46 2011/09/16 16:13:17 plunky Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rstat_proc.c,v 1.45 2011/08/30 17:06:20 plunky Exp $");
+__RCSID("$NetBSD: rstat_proc.c,v 1.46 2011/09/16 16:13:17 plunky Exp $");
#endif
#endif
@@ -378,7 +378,7 @@
switch (rqstp->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
goto leave;
case RSTATPROC_STATS:
diff -r fb24660025c1 -r e52a73de8c83 libexec/rpc.rwalld/rwalld.c
--- a/libexec/rpc.rwalld/rwalld.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/rpc.rwalld/rwalld.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rwalld.c,v 1.22 2011/08/30 17:06:20 plunky Exp $ */
+/* $NetBSD: rwalld.c,v 1.23 2011/09/16 16:13:17 plunky Exp $ */
/*
* Copyright (c) 1993 Christopher G. Demetriou
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rwalld.c,v 1.22 2011/08/30 17:06:20 plunky Exp $");
+__RCSID("$NetBSD: rwalld.c,v 1.23 2011/09/16 16:13:17 plunky Exp $");
#endif /* not lint */
#include <unistd.h>
@@ -157,7 +157,7 @@
switch (rqstp->rq_proc) {
case NULLPROC:
- (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
+ (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
goto leave;
case WALLPROC_WALL:
diff -r fb24660025c1 -r e52a73de8c83 libexec/rpc.sprayd/sprayd.c
--- a/libexec/rpc.sprayd/sprayd.c Fri Sep 16 16:09:03 2011 +0000
+++ b/libexec/rpc.sprayd/sprayd.c Fri Sep 16 16:13:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sprayd.c,v 1.17 2011/08/30 17:06:21 plunky Exp $ */
+/* $NetBSD: sprayd.c,v 1.18 2011/09/16 16:13:17 plunky Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: sprayd.c,v 1.17 2011/08/30 17:06:21 plunky Exp $");
+__RCSID("$NetBSD: sprayd.c,v 1.18 2011/09/16 16:13:17 plunky Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -131,7 +131,7 @@
/*FALLTHROUGH*/
Home |
Main Index |
Thread Index |
Old Index