diff options
| author | plunky <plunky@NetBSD.org> | 2011-08-31 16:24:54 +0000 |
|---|---|---|
| committer | plunky <plunky@NetBSD.org> | 2011-08-31 16:24:54 +0000 |
| commit | 4a1b34295eb5b40b5ca8a211ce311ce5416fa0e0 (patch) | |
| tree | 4319e3566c3b4d77340b76fc390a6035c8ca1014 /usr.sbin | |
| parent | d785c5f22db8c6d4c65f4a9d5538a68c63d3363b (diff) | |
NULL does not need a cast
Diffstat (limited to 'usr.sbin')
31 files changed, 148 insertions, 150 deletions
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c index 60d7e277c4a..fc3cd4ae55e 100644 --- a/usr.sbin/bad144/bad144.c +++ b/usr.sbin/bad144/bad144.c @@ -1,4 +1,4 @@ -/* $NetBSD: bad144.c,v 1.27 2009/04/16 06:27:43 lukem Exp $ */ +/* $NetBSD: bad144.c,v 1.28 2011/08/31 16:24:59 plunky Exp $ */ /* * Copyright (c) 1980, 1986, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1988, 1993\ #if 0 static char sccsid[] = "@(#)bad144.c 8.2 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: bad144.c,v 1.27 2009/04/16 06:27:43 lukem Exp $"); +__RCSID("$NetBSD: bad144.c,v 1.28 2011/08/31 16:24:59 plunky Exp $"); #endif #endif /* not lint */ @@ -441,9 +441,9 @@ blkcopy(int f, daddr_t s1, daddr_t s2) { int tries, n; - if (buf == (char *)NULL) { + if (buf == NULL) { buf = malloc((unsigned)dp->d_secsize); - if (buf == (char *)NULL) + if (buf == NULL) errx(20, "Out of memory"); } for (tries = 0; tries < RETRIES; tries++) { diff --git a/usr.sbin/isdn/isdnd/log.c b/usr.sbin/isdn/isdnd/log.c index e0f68c4e786..8178dacb406 100644 --- a/usr.sbin/isdn/isdnd/log.c +++ b/usr.sbin/isdn/isdnd/log.c @@ -27,7 +27,7 @@ * i4b daemon - logging routines * ----------------------------- * - * $Id: log.c,v 1.7 2009/04/16 05:56:32 lukem Exp $ + * $Id: log.c,v 1.8 2011/08/31 16:24:59 plunky Exp $ * * $FreeBSD$ * @@ -82,7 +82,7 @@ init_log(void) /* set unbuffered operation */ - setvbuf(logfp, (char *)NULL, _IONBF, 0); + setvbuf(logfp, NULL, _IONBF, 0); } else { diff --git a/usr.sbin/isdn/isdnd/main.c b/usr.sbin/isdn/isdnd/main.c index 18506269768..3379b2169c6 100644 --- a/usr.sbin/isdn/isdnd/main.c +++ b/usr.sbin/isdn/isdnd/main.c @@ -27,7 +27,7 @@ * i4b daemon - main program entry * ------------------------------- * - * $Id: main.c,v 1.12 2011/08/31 13:32:37 joerg Exp $ + * $Id: main.c,v 1.13 2011/08/31 16:24:59 plunky Exp $ * * $FreeBSD$ * @@ -353,7 +353,7 @@ main(int argc, char **argv) logit(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile); exit(1); } - setvbuf(acctfp, (char *)NULL, _IONBF, 0); + setvbuf(acctfp, NULL, _IONBF, 0); } /* initialize alias processing */ @@ -790,7 +790,7 @@ reopenfiles(int dummy) logit(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile); error_exit(1, "ERROR, can't open acctfile %s for writing, terminating!", acctfile); } - setvbuf(acctfp, (char *)NULL, _IONBF, 0); + setvbuf(acctfp, NULL, _IONBF, 0); } if (uselogfile) @@ -822,7 +822,7 @@ reopenfiles(int dummy) /* set unbuffered operation */ - setvbuf(logfp, (char *)NULL, _IONBF, 0); + setvbuf(logfp, NULL, _IONBF, 0); } } diff --git a/usr.sbin/isdn/isdnd/process.c b/usr.sbin/isdn/isdnd/process.c index 5f6df61d314..e5b80311173 100644 --- a/usr.sbin/isdn/isdnd/process.c +++ b/usr.sbin/isdn/isdnd/process.c @@ -27,7 +27,7 @@ * i4b daemon - process handling routines * -------------------------------------- * - * $Id: process.c,v 1.3 2003/10/06 09:43:27 itojun Exp $ + * $Id: process.c,v 1.4 2011/08/31 16:24:59 plunky Exp $ * * $FreeBSD$ * @@ -191,7 +191,7 @@ daemonize(void) /* curses output && fork NEEDS controlling tty */ - if ((ioctl(STDIN_FILENO, TIOCSCTTY, (char *)NULL)) < 0) + if ((ioctl(STDIN_FILENO, TIOCSCTTY, NULL)) < 0) { logit(LL_ERR, "ERROR, cannot setup tty as controlling terminal: %s", strerror(errno)); exit(1); diff --git a/usr.sbin/isdn/isdntrace/trace.c b/usr.sbin/isdn/isdntrace/trace.c index 11a72168b33..ab76efe116c 100644 --- a/usr.sbin/isdn/isdntrace/trace.c +++ b/usr.sbin/isdn/isdntrace/trace.c @@ -35,7 +35,7 @@ * trace.c - print traces of D (B) channel activity for isdn4bsd * ------------------------------------------------------------- * - * $Id: trace.c,v 1.12 2011/08/31 13:32:38 joerg Exp $ + * $Id: trace.c,v 1.13 2011/08/31 16:24:59 plunky Exp $ * * $FreeBSD$ * @@ -254,7 +254,7 @@ main(int argc, char *argv[]) exit(1); } - if ((setvbuf(BP, (char *)NULL, _IONBF, 0)) != 0) + if ((setvbuf(BP, NULL, _IONBF, 0)) != 0) { char buffer[80]; @@ -333,7 +333,7 @@ main(int argc, char *argv[]) exit(1); } - if ((setvbuf(Fout, (char *)NULL, _IONBF, 0)) != 0) + if ((setvbuf(Fout, NULL, _IONBF, 0)) != 0) { char buffer[80]; @@ -345,7 +345,7 @@ main(int argc, char *argv[]) } } - if ((setvbuf(stdout, (char *)NULL, _IOLBF, 0)) != 0) + if ((setvbuf(stdout, NULL, _IOLBF, 0)) != 0) { char buffer[80]; @@ -789,7 +789,7 @@ reopenfiles(int dummy) exit(1); } - if ((setvbuf(Fout, (char *)NULL, _IONBF, 0)) != 0) + if ((setvbuf(Fout, NULL, _IONBF, 0)) != 0) { char buffer[80]; @@ -818,7 +818,7 @@ reopenfiles(int dummy) exit(1); } - if ((setvbuf(BP, (char *)NULL, _IONBF, 0)) != 0) + if ((setvbuf(BP, NULL, _IONBF, 0)) != 0) { char buffer[80]; diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c index 34e85e7fd55..3d46df4326b 100644 --- a/usr.sbin/lpr/lpc/cmds.c +++ b/usr.sbin/lpr/lpc/cmds.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.23 2011/01/04 09:43:39 wiz Exp $ */ +/* $NetBSD: cmds.c,v 1.24 2011/08/31 16:24:59 plunky Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\ #if 0 static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: cmds.c,v 1.23 2011/01/04 09:43:39 wiz Exp $"); +__RCSID("$NetBSD: cmds.c,v 1.24 2011/08/31 16:24:59 plunky Exp $"); #endif #endif /* not lint */ @@ -199,7 +199,7 @@ upstat(const char *msg) return; } (void)ftruncate(fd, 0); - if (msg == (char *)NULL) + if (msg == NULL) (void)write(fd, "\n", 1); else (void)write(fd, msg, strlen(msg)); diff --git a/usr.sbin/mrouted/kern.c b/usr.sbin/mrouted/kern.c index 36cf5aafe14..b1206dfe520 100644 --- a/usr.sbin/mrouted/kern.c +++ b/usr.sbin/mrouted/kern.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern.c,v 1.11 2011/02/23 01:23:03 dyoung Exp $ */ +/* $NetBSD: kern.c,v 1.12 2011/08/31 16:24:59 plunky Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -99,7 +99,7 @@ void k_init_dvmrp(void) { #ifdef OLD_KERNEL if (setsockopt(igmp_socket, IPPROTO_IP, MRT_INIT, - (char *)NULL, 0) < 0) + NULL, 0) < 0) #else int v=1; @@ -113,7 +113,7 @@ void k_init_dvmrp(void) void k_stop_dvmrp(void) { if (setsockopt(igmp_socket, IPPROTO_IP, MRT_DONE, - (char *)NULL, 0) < 0) + NULL, 0) < 0) logit(LOG_WARNING, errno, "can't disable Multicast routing in kernel"); } diff --git a/usr.sbin/mrouted/main.c b/usr.sbin/mrouted/main.c index 9990bdfd24b..b2461346e36 100644 --- a/usr.sbin/mrouted/main.c +++ b/usr.sbin/mrouted/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.24 2011/08/31 13:32:38 joerg Exp $ */ +/* $NetBSD: main.c,v 1.25 2011/08/31 16:24:59 plunky Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -29,7 +29,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("@(#) $NetBSD: main.c,v 1.24 2011/08/31 13:32:38 joerg Exp $"); +__RCSID("@(#) $NetBSD: main.c,v 1.25 2011/08/31 16:24:59 plunky Exp $"); #endif #include <ctype.h> @@ -335,7 +335,7 @@ usage: fprintf(stderr, #endif accept_igmp(recvlen); #ifdef SYSV - (void)sigprocmask(SIG_SETMASK, &oblock, (sigset_t *)NULL); + (void)sigprocmask(SIG_SETMASK, &oblock, NULL); #else (void)sigsetmask(omask); #endif @@ -591,7 +591,7 @@ restart(int i) init_installvifs(); #ifdef SYSV - (void)sigprocmask(SIG_SETMASK, &oblock, (sigset_t *)NULL); + (void)sigprocmask(SIG_SETMASK, &oblock, NULL); #else (void)sigsetmask(omask); #endif diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 16ceec0ed22..a499da670c1 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: pwd_mkdb.c,v 1.54 2011/08/31 13:32:39 joerg Exp $ */ +/* $NetBSD: pwd_mkdb.c,v 1.55 2011/08/31 16:24:59 plunky Exp $ */ /* * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ __COPYRIGHT("@(#) Copyright (c) 2000, 2009\ The NetBSD Foundation, Inc. All rights reserved.\ Copyright (c) 1991, 1993, 1994\ The Regents of the University of California. All rights reserved."); -__RCSID("$NetBSD: pwd_mkdb.c,v 1.54 2011/08/31 13:32:39 joerg Exp $"); +__RCSID("$NetBSD: pwd_mkdb.c,v 1.55 2011/08/31 16:24:59 plunky Exp $"); #endif /* not lint */ #if HAVE_NBTOOL_CONFIG_H @@ -345,7 +345,7 @@ main(int argc, char *argv[]) (void)sigaddset(&set, SIGINT); (void)sigaddset(&set, SIGQUIT); (void)sigaddset(&set, SIGTERM); - (void)sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); + (void)sigprocmask(SIG_BLOCK, &set, NULL); /* We don't care what the user wants. */ (void)umask(0); @@ -1040,7 +1040,7 @@ putyptoken(struct pwddb *db) key.data = __UNCONST(__yp_token); key.size = strlen(__yp_token); - data.data = (u_char *)NULL; + data.data = NULL; data.size = 0; if ((*db->db->put)(db->db, &key, &data, R_NOOVERWRITE) == -1) diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index 4fe13f71b01..a7d5048ed3f 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,4 +1,4 @@ -/* $NetBSD: route6d.c,v 1.65 2011/08/31 07:03:00 mbalmer Exp $ */ +/* $NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $ */ /* $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $ */ /* @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: route6d.c,v 1.65 2011/08/31 07:03:00 mbalmer Exp $"); +__RCSID("$NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $"); #endif #include <stdbool.h> @@ -560,7 +560,7 @@ init(void) struct addrinfo hints, *res; char port[NI_MAXSERV]; - ifc = (struct ifc *)NULL; + ifc = NULL; nifc = 0; nindex2ifc = 0; /*initial guess*/ index2ifc = NULL; @@ -3261,7 +3261,7 @@ ifc_find(char *name) if (strcmp(name, ifcp->ifc_name) == 0) return ifcp; } - return (struct ifc *)NULL; + return NULL; } static struct iff * diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c b/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c index e1b3f92174a..9c3524ab491 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_misc.c,v 1.12 2009/11/17 18:37:45 drochner Exp $ */ +/* $NetBSD: pcnfsd_misc.c,v 1.13 2011/08/31 16:24:59 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 */ /* @@ -124,9 +124,9 @@ get_password(usrnam) setpwent(); if (shadowfile) (void) setspent(); /* Setting the shadow password file */ - if ((p = getpwnam(usrnam)) == (struct passwd *) NULL || - (shadowfile && (sp = getspnam(usrnam)) == (struct spwd *) NULL)) - return ((struct passwd *) NULL); + if ((p = getpwnam(usrnam)) == NULL || + (shadowfile && (sp = getspnam(usrnam)) == NULL)) + return (NULL); if (shadowfile) { pswd = sp->sp_pwdp; @@ -136,8 +136,8 @@ get_password(usrnam) #else p = getpwnam(usrnam); - if (p == (struct passwd *) NULL) - return ((struct passwd *) NULL); + if (p == NULL) + return (NULL); pswd = p->pw_passwd; #endif @@ -149,7 +149,7 @@ get_password(usrnam) struct spwd *shadow = getspnam(usrnam); if (!shadow) - return ((struct passwd *) NULL); + return (NULL); pswd = shadow->sp_pwdp; } #endif @@ -166,17 +166,17 @@ get_password(usrnam) } endusershell(); if (!ok) - return ((struct passwd *) NULL); + return (NULL); #else /* * the best we can do is to ensure that the shell ends in "sh" */ ushell = localp.pw_shell; if (strlen(ushell) < 2) - return ((struct passwd *) NULL); + return (NULL); ushell += strlen(ushell) - 2; if (strcmp(ushell, "sh")) - return ((struct passwd *) NULL); + return (NULL); #endif return (&localp); @@ -455,7 +455,7 @@ su_popen(user, cmd, maxtime) (void) setgid(cached_gid); (void) setuid(cached_uid); - (void) execl("/bin/sh", "sh", "-c", cmd, (char *) NULL); + (void) execl("/bin/sh", "sh", "-c", cmd, NULL); _exit(255); } if (pid == -1) { diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c b/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c index c17e857b16d..9fc94670541 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_v1.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_v1.c,v 1.3 1997/10/25 13:45:59 lukem Exp $ */ +/* $NetBSD: pcnfsd_v1.c,v 1.4 2011/08/31 16:24:59 plunky Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v1.c 1.1 91/09/03 12:41:50 SMI */ /* @@ -100,7 +100,7 @@ pcnfsd_auth_1_svc(arg, req) #endif p = get_password(uname); - if (p == (struct passwd *) NULL) + if (p == NULL) return (&r); c1 = strlen(pw); diff --git a/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c b/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c index 8ce29080374..45f488b4a6a 100644 --- a/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c +++ b/usr.sbin/rpc.pcnfsd/pcnfsd_v2.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcnfsd_v2.c,v 1.10 2009/04/18 13:02:36 lukem Exp $ */ +/* $NetBSD: pcnfsd_v2.c,v 1.11 2011/08/31 16:24:59 plunky Exp $ */ /* RE_SID: @(%)/usr/dosnfs/shades_SCCS/unix/pcnfsd/v2/src/SCCS/s.pcnfsd_v2.c 1.2 91/12/18 13:26:13 SMI */ /* @@ -129,7 +129,7 @@ pcnfsd2_auth_2_svc(arg, req) #endif p = get_password(uname); - if (p == (struct passwd *) NULL) + if (p == NULL) return (&r); c1 = strlen(pw); diff --git a/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c b/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c index 0b6f0ec62f0..6b633998305 100644 --- a/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c +++ b/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc.yppasswdd.c,v 1.16 2011/08/31 13:32:40 joerg Exp $ */ +/* $NetBSD: rpc.yppasswdd.c,v 1.17 2011/08/31 16:24:59 plunky Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.16 2011/08/31 13:32:40 joerg Exp $"); +__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.17 2011/08/31 16:24:59 plunky Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -142,7 +142,7 @@ yppasswddprog_1(struct svc_req *rqstp, SVCXPRT *transp) 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); return; case YPPASSWDPROC_UPDATE: diff --git a/usr.sbin/rpcbind/rpcb_svc.c b/usr.sbin/rpcbind/rpcb_svc.c index f9a7e204f5e..0da5ca853f3 100644 --- a/usr.sbin/rpcbind/rpcb_svc.c +++ b/usr.sbin/rpcbind/rpcb_svc.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_svc.c,v 1.2 2007/05/13 20:03:47 christos Exp $ */ +/* $NetBSD: rpcb_svc.c,v 1.3 2011/08/31 16:25:00 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -89,7 +89,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) #endif /* This call just logs, no actual checks */ check_access(transp, rqstp->rq_proc, NULL, RPCBVERS); - (void) svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL); + (void) svc_sendreply(transp, (xdrproc_t)xdr_void, NULL); return; case RPCBPROC_SET: diff --git a/usr.sbin/rpcbind/rpcb_svc_4.c b/usr.sbin/rpcbind/rpcb_svc_4.c index 6b6a3d154d5..8afc9e3aee2 100644 --- a/usr.sbin/rpcbind/rpcb_svc_4.c +++ b/usr.sbin/rpcbind/rpcb_svc_4.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_svc_4.c,v 1.6 2007/05/13 20:03:47 christos Exp $ */ +/* $NetBSD: rpcb_svc_4.c,v 1.7 2011/08/31 16:25:00 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -91,8 +91,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) fprintf(stderr, "RPCBPROC_NULL\n"); #endif check_access(transp, rqstp->rq_proc, NULL, RPCBVERS4); - (void) svc_sendreply(transp, (xdrproc_t) xdr_void, - (char *)NULL); + (void) svc_sendreply(transp, (xdrproc_t) xdr_void, NULL); return; case RPCBPROC_SET: diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c index 17fcc4dbda9..9282076b031 100644 --- a/usr.sbin/rpcbind/rpcb_svc_com.c +++ b/usr.sbin/rpcbind/rpcb_svc_com.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_svc_com.c,v 1.15 2011/08/31 13:32:40 joerg Exp $ */ +/* $NetBSD: rpcb_svc_com.c,v 1.16 2011/08/31 16:25:00 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -170,7 +170,7 @@ map_set(RPCB *regp, char *owner) * add to the end of the list */ rbl = (rpcblist_ptr) malloc((u_int)sizeof (RPCBLIST)); - if (rbl == (rpcblist_ptr)NULL) { + if (rbl == NULL) { return (FALSE); } a = &(rbl->rpcb_map); @@ -189,7 +189,7 @@ map_set(RPCB *regp, char *owner) free((void *)rbl); return (FALSE); } - rbl->rpcb_next = (rpcblist_ptr)NULL; + rbl->rpcb_next = NULL; if (list_rbl == NULL) { list_rbl = rbl; } else { @@ -601,7 +601,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, char *buf_alloc = NULL, *outbufp; char *outbuf_alloc = NULL; char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; + struct netbuf *na = NULL; struct rpc_msg call_msg; int outlen; u_int sendsz; @@ -688,7 +688,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, a.rmt_proc, transp->xp_netid, rbl); - if (rbl == (rpcblist_ptr)NULL) { + if (rbl == NULL) { #ifdef RPCBIND_DEBUG if (debugging) fprintf(stderr, "not found\n"); @@ -721,7 +721,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, if (reply_type == RPCBPROC_INDIRECT) { uaddr = mergeaddr(transp, transp->xp_netid, rbl->rpcb_map.r_addr, NULL); - if ((uaddr == (char *) NULL) || uaddr[0] == '\0') { + if ((uaddr == NULL) || uaddr[0] == '\0') { svcerr_noprog(transp); if (uaddr != NULL) { free((void *) uaddr); @@ -733,7 +733,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, } } nconf = rpcbind_get_conf(transp->xp_netid); - if (nconf == (struct netconfig *)NULL) { + if (nconf == NULL) { if (reply_type == RPCBPROC_INDIRECT) svcerr_systemerr(transp); if (debugging) diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index 74aee7fcda8..de0876ad112 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpcbind.c,v 1.17 2011/08/31 13:32:40 joerg Exp $ */ +/* $NetBSD: rpcbind.c,v 1.18 2011/08/31 16:25:00 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -335,7 +335,7 @@ init_transport(struct netconfig *nconf) my_xprt = (SVCXPRT *)svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); - if (my_xprt == (SVCXPRT *)NULL) { + if (my_xprt == NULL) { warnx("Could not create service for `%s'", nconf->nc_netid); goto error; } diff --git a/usr.sbin/sup/source/scan.c b/usr.sbin/sup/source/scan.c index 2ddab05e3e2..b3694d6e61a 100644 --- a/usr.sbin/sup/source/scan.c +++ b/usr.sbin/sup/source/scan.c @@ -1,4 +1,4 @@ -/* $NetBSD: scan.c,v 1.29 2011/01/04 10:23:40 wiz Exp $ */ +/* $NetBSD: scan.c,v 1.30 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -373,7 +373,7 @@ makescanlists(void) (void) fclose(f); } if (count == 0) - makescan((char *) NULL, (char *) NULL); + makescan(NULL, NULL); } static int @@ -427,7 +427,7 @@ getscan(char *listfile, char *scanfile) { listT = NULL; if (!getscanfile(scanfile)) { /* check for pre-scanned file list */ - scantime = time((time_t *) NULL); + scantime = time(NULL); doscan(listfile); /* read list file and scan disk */ } } @@ -450,7 +450,7 @@ doscan(char *listfile) readlistfile(buf); /* get contents of list file */ (void) Tprocess(upgT, listone, NULL); /* build list of files * specified */ - cdprefix((char *) NULL); + cdprefix(NULL); Tfree(&upgT); Tfree(&flagsT); Tfree(&omitT); @@ -518,11 +518,11 @@ readlistfile(char *fname) break; case LINCLUDE: while (*(q = nxtarg(&p, " \t"))) { - cdprefix((char *) NULL); + cdprefix(NULL); n = expand(q, speclist, SPECNUMBER); for (i = 0; i < n && i < SPECNUMBER; i++) { readlistfile(speclist[i]); - cdprefix((char *) NULL); + cdprefix(NULL); free(speclist[i]); } cdprefix(prefix); @@ -553,7 +553,7 @@ readlistfile(char *fname) if (lt == LOMITANY) (void) Tinsert(t, q, FALSE); else - expTinsert(q, t, flags, (char *) NULL); + expTinsert(q, t, flags, NULL); } } (void) fclose(f); @@ -582,7 +582,7 @@ expTinsert(char *p, TREE ** t, int flags, char *exec) static int listone(TREE * t, void *v __unused) { /* expand and add one name from upgrade list */ - listentry(t->Tname, t->Tname, (char *) NULL, (t->Tflags & FALWAYS) != 0); + listentry(t->Tname, t->Tname, NULL, (t->Tflags & FALWAYS) != 0); return (SCMOK); } @@ -951,7 +951,7 @@ makescanfile(char *scanfile) (void)unlink(tname); goaway("Can't change %s to %s", tname, fname); } - tbuf[0].tv_sec = time((time_t *) NULL); + tbuf[0].tv_sec = time(NULL); tbuf[0].tv_usec = 0; tbuf[1].tv_sec = scantime; tbuf[1].tv_usec = 0; diff --git a/usr.sbin/sup/source/scm.c b/usr.sbin/sup/source/scm.c index 311e54de51d..1dc73b5553c 100644 --- a/usr.sbin/sup/source/scm.c +++ b/usr.sbin/sup/source/scm.c @@ -1,4 +1,4 @@ -/* $NetBSD: scm.c,v 1.28 2009/10/17 22:26:13 christos Exp $ */ +/* $NetBSD: scm.c,v 1.29 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -368,7 +368,7 @@ dobackoff(int *t, int *b) if (*t == 0) return (0); s = *b * 30; - if (gettimeofday(&tt, (struct timezone *) NULL) >= 0) + if (gettimeofday(&tt, NULL) >= 0) s += ((uint32_t)tt.tv_usec >> 8) % s; if (*b < 32) *b <<= 1; diff --git a/usr.sbin/sup/source/scmio.c b/usr.sbin/sup/source/scmio.c index a7eae2155e9..1f33a491120 100644 --- a/usr.sbin/sup/source/scmio.c +++ b/usr.sbin/sup/source/scmio.c @@ -1,4 +1,4 @@ -/* $NetBSD: scmio.c,v 1.20 2010/10/20 17:05:54 christos Exp $ */ +/* $NetBSD: scmio.c,v 1.21 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -537,7 +537,7 @@ readmsg(int msg) /* check for MSGGOAWAY in case he noticed problems first */ if (m != MSGGOAWAY) return (scmerr(-1, "Received unexpected message %d", m)); - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); (void) readstring(&goawayreason); (void) readmend(); if (goawayreason == NULL) diff --git a/usr.sbin/sup/source/supcmain.c b/usr.sbin/sup/source/supcmain.c index 0d501c385d8..75677cbf552 100644 --- a/usr.sbin/sup/source/supcmain.c +++ b/usr.sbin/sup/source/supcmain.c @@ -1,4 +1,4 @@ -/* $NetBSD: supcmain.c,v 1.30 2009/10/17 20:46:03 christos Exp $ */ +/* $NetBSD: supcmain.c,v 1.31 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -725,7 +725,7 @@ init(int argc, char **argv) Tfree(&collT); if (firstC == NULL) logquit(1, "No collections to upgrade"); - timenow = time((time_t *) NULL); + timenow = time(NULL); if (*supfname == '\0') p = "standard input"; else if (sysflag) diff --git a/usr.sbin/sup/source/supcmeat.c b/usr.sbin/sup/source/supcmeat.c index 08e66ea66c8..c7796566979 100644 --- a/usr.sbin/sup/source/supcmeat.c +++ b/usr.sbin/sup/source/supcmeat.c @@ -1,4 +1,4 @@ -/* $NetBSD: supcmeat.c,v 1.38 2010/10/20 17:05:54 christos Exp $ */ +/* $NetBSD: supcmeat.c,v 1.39 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -210,7 +210,7 @@ getcoll(void) t = getcollhost(&tout, &backoff, &state, &nhosts); if (t == NULL) { finishup(SCMEOF); - notify((char *) NULL); + notify(NULL); return; } t->Tmode = SCMEOF; @@ -233,7 +233,7 @@ getcoll(void) thisC->Clockfd = -1; } finishup(x); - notify((char *) NULL); + notify(NULL); } /*** Sign on to file server ***/ @@ -273,7 +273,7 @@ signon(TREE * t, int nhosts, int *tout) x = msgsignonack(); /* receive signon ack from fileserver */ if (x != SCMOK) goaway("Error reading signon reply from fileserver"); - tloc = time((time_t *) NULL); + tloc = time(NULL); vnotify("SUP Fileserver %d.%d (%s) %d on %s at %.8s\n", protver, pgmver, scmver, fspid, remotehost(), ctime(&tloc) + 11); free(scmver); @@ -374,7 +374,7 @@ setup(TREE * t) t->Tmode = SCMOK; doneack = FDONESRVERROR; donereason = "Fileserver is busy"; - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); (void) msgdone(); return (TRUE); default: @@ -429,13 +429,13 @@ suplogin(void) thisC->Clockfd = f; vnotify("SUP Locked collection %s for exclusive access\n", collname); } - logcrypt = (char *) NULL; + logcrypt = NULL; loguser = thisC->Clogin; logpswd = thisC->Cpswd; #ifndef CRYPTING /* Define CRYPTING for backwards compatibility * with old supfileservers */ - if (thisC->Clogin != (char *) NULL) /* othewise we only encrypt if + if (thisC->Clogin != NULL) /* othewise we only encrypt if * there is a login id */ #endif /* CRYPTING */ { @@ -444,9 +444,9 @@ suplogin(void) } x = msglogin(); #ifndef CRYPTING - if (thisC->Clogin != (char *) NULL) + if (thisC->Clogin != NULL) #endif - (void) netcrypt((char *) NULL); /* turn off encryption */ + (void) netcrypt(NULL); /* turn off encryption */ if (x != SCMOK) goaway("Error sending login request to file server"); x = msglogack(); @@ -727,7 +727,7 @@ recvfiles(void) x = msgsend(); if (x != SCMOK) goaway("Error sending receive file request to file server"); - (void) Tinsert(&upgradeT, (char *) NULL, FALSE); + (void) Tinsert(&upgradeT, NULL, FALSE); x = msgrecv(recvone, &recvmore); if (x != SCMOK) goaway("Error receiving file from file server"); @@ -889,7 +889,7 @@ recvdir(TREE * t, int new, struct stat * statp) (void) chown(t->Tname, t->Tuid, t->Tgid); (void) chmod(t->Tname, t->Tmode & S_IMODE); } - tbuf[0].tv_sec = time((time_t *) NULL); + tbuf[0].tv_sec = time(NULL); tbuf[0].tv_usec = 0; tbuf[1].tv_sec = t->Tmtime; tbuf[1].tv_usec = 0; @@ -968,7 +968,7 @@ recvreg(TREE * t, int new, struct stat * statp) (void) chown(t->Tname, t->Tuid, t->Tgid); (void) chmod(t->Tname, t->Tmode & S_IMODE); } - tbuf[0].tv_sec = time((time_t *) NULL); + tbuf[0].tv_sec = time(NULL); tbuf[0].tv_usec = 0; tbuf[1].tv_sec = t->Tmtime; tbuf[1].tv_usec = 0; @@ -1021,7 +1021,7 @@ recvreg(TREE * t, int new, struct stat * statp) (void) fclose(fout); vnotify("SUP Backup of %s created\n", t->Tname); } - x = copyfile(t->Tname, (char *) NULL); + x = copyfile(t->Tname, NULL); if (x) return (TRUE); if ((t->Tflags & FNOACCT) == 0) { @@ -1030,7 +1030,7 @@ recvreg(TREE * t, int new, struct stat * statp) (void) chown(t->Tname, t->Tuid, t->Tgid); (void) chmod(t->Tname, t->Tmode & S_IMODE); } - tbuf[0].tv_sec = time((time_t *) NULL); + tbuf[0].tv_sec = time(NULL); tbuf[0].tv_usec = 0; tbuf[1].tv_sec = t->Tmtime; tbuf[1].tv_usec = 0; @@ -1362,14 +1362,14 @@ finishup(int x) (void) strcpy(collrelname, collname); } dontjump = TRUE; /* once here, no more longjmp */ - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); if (protver < 6) { /* done with server */ if (x == SCMOK) - goaway((char *) NULL); + goaway(NULL); (void) requestend(); } - tloc = time((time_t *) NULL); + tloc = time(NULL); if (x != SCMOK) { notify("SUP: Upgrade of %s aborted at %s", collrelname, ctime(&tloc) + 4); @@ -1467,7 +1467,7 @@ done(int value, const char *fmt, ...) va_list ap; va_start(ap, fmt); - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); if (fmt) vsnprintf(buf, sizeof(buf), fmt, ap); @@ -1475,11 +1475,11 @@ done(int value, const char *fmt, ...) if (protver < 6) { if (goawayreason) free(goawayreason); - goawayreason = (fmt) ? estrdup(buf) : (char *) NULL; + goawayreason = (fmt) ? estrdup(buf) : NULL; (void) msggoaway(); } else { doneack = value; - donereason = (fmt) ? buf : (char *) NULL; + donereason = (fmt) ? buf : NULL; (void) msgdone(); } if (!dontjump) @@ -1494,7 +1494,7 @@ goaway(const char *fmt, ...) va_start(ap, fmt); - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); if (fmt) { vsnprintf(buf, sizeof(buf), fmt, ap); goawayreason = buf; diff --git a/usr.sbin/sup/source/supcmisc.c b/usr.sbin/sup/source/supcmisc.c index 171874e0041..996e6a22576 100644 --- a/usr.sbin/sup/source/supcmisc.c +++ b/usr.sbin/sup/source/supcmisc.c @@ -1,4 +1,4 @@ -/* $NetBSD: supcmisc.c,v 1.21 2010/10/20 17:05:54 christos Exp $ */ +/* $NetBSD: supcmisc.c,v 1.22 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -331,7 +331,7 @@ notify(const char *fmt, ...) (void)unlink(template); } else noteF = stdout; - tloc = time((time_t *) NULL); + tloc = time(NULL); fprintf(noteF, "SUP Upgrade of %s at %s", collrelname, ctime(&tloc)); (void) fflush(noteF); diff --git a/usr.sbin/sup/source/supfilesrv.c b/usr.sbin/sup/source/supfilesrv.c index 81c7db5a9d7..a4952324165 100644 --- a/usr.sbin/sup/source/supfilesrv.c +++ b/usr.sbin/sup/source/supfilesrv.c @@ -1,4 +1,4 @@ -/* $NetBSD: supfilesrv.c,v 1.46 2011/03/17 19:43:34 christos Exp $ */ +/* $NetBSD: supfilesrv.c,v 1.47 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -399,7 +399,7 @@ main(int argc, char **argv) #endif logopen("supfile"); - tloc = time((time_t *) NULL); + tloc = time(NULL); loginfo("SUP File Server Version %d.%d (%s) starting at %s", PROTOVERSION, PGMVERSION, scmversion, fmttime(tloc)); if (live) { @@ -680,7 +680,7 @@ init(int argc, char **argv) if (netcrypt(PSWDCRYPT) != SCMOK) /* encrypt password data */ quit(1, "Running non-crypting fileserver\n"); x = msglogin(); - (void) netcrypt((char *) NULL); /* turn off encryption */ + (void) netcrypt(NULL); /* turn off encryption */ if (x != SCMOK) quit(1, "Error sending login request to file server\n"); x = msglogack(); @@ -718,7 +718,7 @@ answer(void) goawayreason = NULL; donereason = NULL; lockfd = -1; - starttime = time((time_t *) NULL); + starttime = time(NULL); if (!setjmp(sjbuf)) { srvsignon(); srvsetup(); @@ -732,7 +732,7 @@ answer(void) exit(0); xargv[0] = "sup"; xargv[1] = "-X"; - xargv[xargc] = (char *) NULL; + xargv[xargc] = NULL; (void) dup2(netfile, 0); (void) dup2(netfile, 1); (void) dup2(netfile, 2); @@ -1087,7 +1087,7 @@ docrypt(void) x = msgcrypt(); if (x != SCMOK) goaway("Error reading encryption test request from client"); - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); if (strcmp(crypttest, CRYPTTEST) != 0) goaway("Client not encrypting data properly"); free(crypttest); @@ -1107,7 +1107,7 @@ srvlogin(void) (void) netcrypt(PSWDCRYPT); /* encrypt acct name and password */ x = msglogin(); - (void) netcrypt((char *) NULL); /* turn off encryption */ + (void) netcrypt(NULL); /* turn off encryption */ if (x != SCMOK) goaway("Error reading login request from client"); if (logcrypt) { @@ -1468,15 +1468,15 @@ srvfinishup(time_t starttime) time_t finishtime; char *releasename; - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); if (protver < 6) { if (goawayreason != NULL) free(goawayreason); - goawayreason = (char *) NULL; + goawayreason = NULL; x = msggoaway(); doneack = FDONESUCCESS; donereason = estrdup("Unknown"); - } else if (goawayreason == (char *) NULL) + } else if (goawayreason == NULL) x = msgdone(); else { doneack = FDONEGOAWAY; @@ -1500,7 +1500,7 @@ srvfinishup(time_t starttime) else if (doneack != FDONESUCCESS) logerr("%s: Reason %d: %s", remotehost(), doneack, donereason); goawayreason = donereason; - cdprefix((char *) NULL); + cdprefix(NULL); if (collname == NULL) { logerr("%s: NULL collection in svrfinishup", remotehost()); return; @@ -1508,7 +1508,7 @@ srvfinishup(time_t starttime) (void) sprintf(lognam, FILELOGFILE, collname); if ((logfd = open(lognam, O_APPEND | O_WRONLY, 0644)) < 0) return; /* can not open file up...error */ - finishtime = time((time_t *) NULL); + finishtime = time(NULL); p = tmpbuf; (void) sprintf(p, "%s ", fmttime(lasttime)); p += strlen(p); @@ -1587,8 +1587,8 @@ linkcheck(TREE * t, int d, int i) h = Hlookup(inodeH, i, d); if (h) return (h->Htree); - Hinsert(inodeH, i, d, (char *) NULL, t); - return ((TREE *) NULL); + Hinsert(inodeH, i, d, NULL, t); + return (NULL); } char * @@ -1604,7 +1604,7 @@ uconvert(int uid) if (pw == NULL) return (""); p = estrdup(pw->pw_name); - Hinsert(uidH, uid, 0, p, (TREE *) NULL); + Hinsert(uidH, uid, 0, p, NULL); return (p); } @@ -1621,7 +1621,7 @@ gconvert(int gid) if (gr == NULL) return (""); p = estrdup(gr->gr_name); - Hinsert(gidH, gid, 0, p, (TREE *) NULL); + Hinsert(gidH, gid, 0, p, NULL); return (p); } @@ -1809,7 +1809,7 @@ goaway(const char *fmt, ...) va_list ap; va_start(ap, fmt); - (void) netcrypt((char *) NULL); + (void) netcrypt(NULL); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); diff --git a/usr.sbin/sup/source/supmsg.c b/usr.sbin/sup/source/supmsg.c index ebfd8254ff6..9c6ddc786d7 100644 --- a/usr.sbin/sup/source/supmsg.c +++ b/usr.sbin/sup/source/supmsg.c @@ -1,4 +1,4 @@ -/* $NetBSD: supmsg.c,v 1.17 2009/10/17 22:26:13 christos Exp $ */ +/* $NetBSD: supmsg.c,v 1.18 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -187,7 +187,7 @@ msgsetup(void) x = readint(&newonly); if (x == SCMOK) { if (protver < 6) - release = (char *) NULL; + release = NULL; else x = readstring(&release); } @@ -353,7 +353,7 @@ msgrefuse(void) if (x == SCMOK) x = Tprocess(refuseT, refuseone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = writemend(); } @@ -390,7 +390,7 @@ msglist(void) if (x == SCMOK) x = Tprocess(listT, listone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = writeint((int) scantime); if (x == SCMOK) @@ -472,7 +472,7 @@ msgneed(void) if (x == SCMOK) x = Tprocess(needT, needone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = writemend(); } @@ -499,7 +499,7 @@ msgdeny(void) if (x == SCMOK) x = Tprocess(denyT, denyone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = writemend(); } else { @@ -555,7 +555,7 @@ msgrecv(int (*xferfile)(TREE *, va_list), ...) x = writemsg(MSGRECV); if (t == NULL) { if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = writemend(); va_end(args); @@ -582,11 +582,11 @@ msgrecv(int (*xferfile)(TREE *, va_list), ...) if (x == SCMOK) x = Tprocess(t->Tlink, writeone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = Tprocess(t->Texec, writeone, NULL); if (x == SCMOK) - x = writestring((char *) NULL); + x = writestring(NULL); if (x == SCMOK) x = (*xferfile) (t, args); if (x == SCMOK) diff --git a/usr.sbin/sup/source/supscan.c b/usr.sbin/sup/source/supscan.c index 3ed921e03c6..6a38af16462 100644 --- a/usr.sbin/sup/source/supscan.c +++ b/usr.sbin/sup/source/supscan.c @@ -1,4 +1,4 @@ -/* $NetBSD: supscan.c,v 1.18 2009/10/17 20:46:03 christos Exp $ */ +/* $NetBSD: supscan.c,v 1.19 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -191,14 +191,14 @@ main(int argc, char **argv) basedir = c->Cbase; prefix = c->Cprefix; (void) chdir(basedir); - scantime = time((time_t *) NULL); + scantime = time(NULL); if (!quiet) printf("SUP Scan for %s starting at %s", collname, ctime(&scantime)); (void) fflush(stdout); if (!setjmp(sjbuf)) { makescanlists(); /* record names in scan files */ - scantime = time((time_t *) NULL); + scantime = time(NULL); if (!quiet) printf("SUP Scan for %s completed at %s", collname, ctime(&scantime)); @@ -294,8 +294,7 @@ init(int argc, char **argv) p = skipover(p, " \t="); if (!localhost(p)) continue; - *c = getscancoll(filename, estrdup(collname), - (char *) NULL); + *c = getscancoll(filename, estrdup(collname), NULL); if (*c) c = &((*c)->Cnext); } @@ -325,7 +324,7 @@ init(int argc, char **argv) if (argc < 2 || argc > 3) usage(); firstC = getscancoll(filename, estrdup(argv[1]), - argc > 2 ? estrdup(argv[2]) : (char *) NULL); + argc > 2 ? estrdup(argv[2]) : NULL); } static SCAN_COLLECTION * diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 8eb3217c5c3..8679ef0eb4a 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.104 2011/06/20 08:27:15 enami Exp $ */ +/* $NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993, 1994\ #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.104 2011/06/20 08:27:15 enami Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $"); #endif #endif /* not lint */ @@ -2671,7 +2671,7 @@ domark(int fd, short event, void *ev) DPRINTF((D_CALL|D_EVENT), "domark()\n"); BLOCK_SIGNALS(omask, newmask); - now = time((time_t *)NULL); + now = time(NULL); MarkSeq += TIMERINTVL; if (MarkSeq >= MarkInterval) { logmsg_async(LOG_INFO, NULL, "-- MARK --", ADDDATE|MARK); diff --git a/usr.sbin/tcpdchk/inetcf.c b/usr.sbin/tcpdchk/inetcf.c index d87e7c27e8b..97628edbef7 100644 --- a/usr.sbin/tcpdchk/inetcf.c +++ b/usr.sbin/tcpdchk/inetcf.c @@ -1,4 +1,4 @@ -/* $NetBSD: inetcf.c,v 1.8 2003/07/13 12:07:16 itojun Exp $ */ +/* $NetBSD: inetcf.c,v 1.9 2011/08/31 16:25:00 plunky Exp $ */ /* * Routines to parse an inetd.conf or tlid.conf file. This would be a great @@ -12,7 +12,7 @@ #if 0 static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; #else -__RCSID("$NetBSD: inetcf.c,v 1.8 2003/07/13 12:07:16 itojun Exp $"); +__RCSID("$NetBSD: inetcf.c,v 1.9 2011/08/31 16:25:00 plunky Exp $"); #endif #endif @@ -44,7 +44,7 @@ char *uses_libwrap[] = { "tcp", "/usr/sbin/sshd", "sshd", "udp", "/usr/sbin/syslogd", "syslogd", "udp", "/usr/sbin/rpcbind", "rpcbind", - (char *) NULL + NULL }; /* diff --git a/usr.sbin/user/defs.h b/usr.sbin/user/defs.h index 578bc40a78b..28a6d10dc7b 100644 --- a/usr.sbin/user/defs.h +++ b/usr.sbin/user/defs.h @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.6 2005/11/25 08:00:18 agc Exp $ */ +/* $NetBSD: defs.h,v 1.7 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1999 Alistair G. Crooks. All rights reserved. @@ -31,14 +31,14 @@ #define DEFS_H_ #define NEWARRAY(type,ptr,size,action) do { \ - if ((ptr = (type *) calloc(sizeof(type), size)) == (type *) NULL) { \ + if ((ptr = (type *) calloc(sizeof(type), size)) == NULL) { \ warn("can't allocate %ld bytes", (long)(size * sizeof(type))); \ action; \ } \ } while( /* CONSTCOND */ 0) #define RENEW(type,ptr,size,action) do { \ - if ((ptr = (type *) realloc(ptr, sizeof(type) * size)) == (type *) NULL) { \ + if ((ptr = (type *) realloc(ptr, sizeof(type) * size)) == NULL) { \ warn("can't realloc %ld bytes", (long)(size * sizeof(type))); \ action; \ } \ diff --git a/usr.sbin/vipw/vipw.c b/usr.sbin/vipw/vipw.c index 6f25681bd78..39bc0e2aa2f 100644 --- a/usr.sbin/vipw/vipw.c +++ b/usr.sbin/vipw/vipw.c @@ -1,4 +1,4 @@ -/* $NetBSD: vipw.c,v 1.15 2011/08/30 20:52:10 joerg Exp $ */ +/* $NetBSD: vipw.c,v 1.16 2011/08/31 16:25:00 plunky Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994\ #if 0 static char sccsid[] = "@(#)vipw.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: vipw.c,v 1.15 2011/08/30 20:52:10 joerg Exp $"); +__RCSID("$NetBSD: vipw.c,v 1.16 2011/08/31 16:25:00 plunky Exp $"); #endif #endif /* not lint */ @@ -117,7 +117,7 @@ main(int argc, char *argv[]) if (begin.st_mtime == end.st_mtime && begin.st_mtimensec == end.st_mtimensec) { warnx("no changes made"); - pw_error((char *)NULL, 0, 0); + pw_error(NULL, 0, 0); } if (pw_mkdb(NULL, 0) == 0) break; |
