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 | |
| parent | d785c5f22db8c6d4c65f4a9d5538a68c63d3363b (diff) | |
NULL does not need a cast
87 files changed, 352 insertions, 355 deletions
diff --git a/bin/csh/func.c b/bin/csh/func.c index ce91c37d034..c0819883162 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -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 @@ findlim(Char *cp) { 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 --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c index 3eef7e221b4..9efba82c1b8 100644 --- a/bin/ksh/c_ksh.c +++ b/bin/ksh/c_ksh.c @@ -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 @@ c_bind(wp) 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 --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index d194b183c13..ba3ae2bed2b 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -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 @@ c_unset(wp) } unset(vp, strchr(id, '[') ? 1 : 0); } else { /* unset function */ - if (define(id, (struct op *) NULL)) + if (define(id, NULL)) ret = 1; } return ret; diff --git a/bin/ksh/history.c b/bin/ksh/history.c index 66498c5e709..dfd6e48b9ec 100644 --- a/bin/ksh/history.c +++ b/bin/ksh/history.c @@ -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 @@ sethistfile(name) void init_histvec() { - if (histlist == (char **)NULL) { + if (histlist == NULL) { histsize = HISTORYSIZE; histlist = (char **)alloc(histsize*sizeof (char *), APERM); histptr = histlist - 1; diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index 2ef0ec0ace6..ebe11033979 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -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 @@ ar_next(void) 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 --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c index 9effe9241ac..d4ba54baa87 100644 --- a/bin/pax/ar_subs.c +++ b/bin/pax/ar_subs.c @@ -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 @@ list(void) ((*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 @@ list(void) * 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 @@ extract(void) ((*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 @@ extract(void) * 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 @@ wr_archive(ARCHD *arcn, int is_app) 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 @@ wr_archive(ARCHD *arcn, int is_app) (*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 @@ append(void) * 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 @@ copy(void) * 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 --git a/bin/pax/options.c b/bin/pax/options.c index fdfdb41c99f..8924a833e9f 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -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 @@ tar_options(int argc, char **argv) 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 --git a/bin/pax/sel_subs.c b/bin/pax/sel_subs.c index de353d68d51..87f1e797f23 100644 --- a/bin/pax/sel_subs.c +++ b/bin/pax/sel_subs.c @@ -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 @@ usr_add(char *str) } 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 @@ grp_add(char *str) } 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 @@ trng_add(char *str) /* * 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 --git a/bin/sh/cd.c b/bin/sh/cd.c index 80b857af538..f81540d04a4 100644 --- a/bin/sh/cd.c +++ b/bin/sh/cd.c @@ -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 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: cd.c,v 1.43 2011/06/18 21:18:46 christos Exp $"); +__RCSID("$NetBSD: cd.c,v 1.44 2011/08/31 16:24:54 plunky Exp $"); #endif #endif /* not lint */ @@ -424,8 +424,8 @@ find_curdir(int noerror) INTOFF; if (pipe(pip) < 0) error("Pipe call failed"); - jp = makejob((union node *)NULL, 1); - if (forkshell(jp, (union node *)NULL, FORK_NOJOB) == 0) { + jp = makejob(NULL, 1); + if (forkshell(jp, NULL, FORK_NOJOB) == 0) { (void) close(pip[0]); if (pip[1] != 1) { close(1); diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 5a8d583fe42..87aea900092 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.101 2011/02/17 15:13:49 pooka Exp $ */ +/* $NetBSD: eval.c,v 1.102 2011/08/31 16:24:54 plunky Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.101 2011/02/17 15:13:49 pooka Exp $"); +__RCSID("$NetBSD: eval.c,v 1.102 2011/08/31 16:24:54 plunky Exp $"); #endif #endif /* not lint */ @@ -298,7 +298,7 @@ evaltree(union node *n, int flags) do_etest = !(flags & EV_TESTED); break; case NCMD: - evalcommand(n, flags, (struct backcmd *)NULL); + evalcommand(n, flags, NULL); do_etest = !(flags & EV_TESTED); break; default: diff --git a/bin/sh/expand.c b/bin/sh/expand.c index fbaac7dbd46..aa781e6d055 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.85 2011/08/23 10:04:39 christos Exp $ */ +/* $NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.85 2011/08/23 10:04:39 christos Exp $"); +__RCSID("$NetBSD: expand.c,v 1.86 2011/08/31 16:24:54 plunky Exp $"); #endif #endif /* not lint */ @@ -120,7 +120,7 @@ void expandhere(union node *arg, int fd) { herefd = fd; - expandarg(arg, (struct arglist *)NULL, 0); + expandarg(arg, NULL, 0); xwrite(fd, stackblock(), expdest - stackblock()); } @@ -533,7 +533,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla case VSQUESTION: if (*p != CTLENDVAR) { outfmt(&errout, "%s\n", startp); - error((char *)NULL); + error(NULL); } error("%.*s: parameter %snot set", (int)(p - str - 1), diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 83b49e35e06..2e9a51c12ab 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.79 2010/12/13 16:54:04 christos Exp $ */ +/* $NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.79 2010/12/13 16:54:04 christos Exp $"); +__RCSID("$NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -862,7 +862,7 @@ xxreadtoken(void) } } breakloop: - return readtoken1(c, BASESYNTAX, (char *)NULL, 0); + return readtoken1(c, BASESYNTAX, NULL, 0); #undef RETURN } @@ -1611,7 +1611,7 @@ synerror(const char *msg) else outfmt(&errout, "%s: ", getprogname()); outfmt(&errout, "Syntax error: %s\n", msg); - error((char *)NULL); + error(NULL); /* NOTREACHED */ } diff --git a/bin/sh/redir.c b/bin/sh/redir.c index 497963f0a81..082004a860a 100644 --- a/bin/sh/redir.c +++ b/bin/sh/redir.c @@ -1,4 +1,4 @@ -/* $NetBSD: redir.c,v 1.31 2011/02/17 15:13:49 pooka Exp $ */ +/* $NetBSD: redir.c,v 1.32 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: redir.c,v 1.31 2011/02/17 15:13:49 pooka Exp $"); +__RCSID("$NetBSD: redir.c,v 1.32 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -270,7 +270,7 @@ openhere(union node *redir) goto out; } } - if (forkshell((struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) { + if (forkshell(NULL, NULL, FORK_NOJOB) == 0) { close(pip[0]); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); diff --git a/games/adventure/init.c b/games/adventure/init.c index 4d289e641e0..bb316c515fe 100644 --- a/games/adventure/init.c +++ b/games/adventure/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.19 2009/08/25 06:56:52 dholland Exp $ */ +/* $NetBSD: init.c,v 1.20 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93"; #else -__RCSID("$NetBSD: init.c,v 1.19 2009/08/25 06:56:52 dholland Exp $"); +__RCSID("$NetBSD: init.c,v 1.20 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -289,7 +289,7 @@ void startup(void) { demo = Start(); - srand((int) (time((time_t *) NULL))); /* random seed */ + srand((int)time(NULL)); /* random seed */ #if 0 srand(371); /* non-random seed */ #endif diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c index 696208c6852..bd6c8141543 100644 --- a/games/arithmetic/arithmetic.c +++ b/games/arithmetic/arithmetic.c @@ -1,4 +1,4 @@ -/* $NetBSD: arithmetic.c,v 1.25 2009/08/27 00:21:45 dholland Exp $ */ +/* $NetBSD: arithmetic.c,v 1.26 2011/08/31 16:24:55 plunky Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: arithmetic.c,v 1.25 2009/08/27 00:21:45 dholland Exp $"); +__RCSID("$NetBSD: arithmetic.c,v 1.26 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -139,7 +139,7 @@ main(int argc, char **argv) usage(); /* Seed the random-number generator. */ - srandom((int)time((time_t *)NULL)); + srandom((int)time(NULL)); (void)signal(SIGINT, intr); diff --git a/games/boggle/boggle/help.c b/games/boggle/boggle/help.c index 365431f0f77..0310683417f 100644 --- a/games/boggle/boggle/help.c +++ b/games/boggle/boggle/help.c @@ -1,4 +1,4 @@ -/* $NetBSD: help.c,v 1.6 2005/07/01 16:38:24 jmc Exp $ */ +/* $NetBSD: help.c,v 1.7 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)help.c 8.1 (Berkeley) 6/11/93"; #else -__RCSID("$NetBSD: help.c,v 1.6 2005/07/01 16:38:24 jmc Exp $"); +__RCSID("$NetBSD: help.c,v 1.7 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -70,7 +70,7 @@ help(void) while (!eof) { for (i = 0; i < nlines - 3; i++) { - if (fgets(buf, sizeof(buf), fp) == (char *) NULL) { + if (fgets(buf, sizeof(buf), fp) == NULL) { eof = 1; break; } diff --git a/games/boggle/boggle/mach.c b/games/boggle/boggle/mach.c index 823c738df8e..d9f9e3484ee 100644 --- a/games/boggle/boggle/mach.c +++ b/games/boggle/boggle/mach.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach.c,v 1.20 2009/08/12 05:29:40 dholland Exp $ */ +/* $NetBSD: mach.c,v 1.21 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93"; #else -__RCSID("$NetBSD: mach.c,v 1.20 2009/08/12 05:29:40 dholland Exp $"); +__RCSID("$NetBSD: mach.c,v 1.21 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -257,7 +257,7 @@ get_line(char *q) } *p = '\0'; if (ch == EOF) - return((char *) NULL); + return (NULL); return(q); } diff --git a/games/ching/printching/printching.c b/games/ching/printching/printching.c index 54c08921ba7..bde106892f8 100644 --- a/games/ching/printching/printching.c +++ b/games/ching/printching/printching.c @@ -1,4 +1,4 @@ -/* $NetBSD: printching.c,v 1.4 2009/08/12 05:40:04 dholland Exp $ */ +/* $NetBSD: printching.c,v 1.5 2011/08/31 16:24:55 plunky Exp $ */ /* * Copyright (c) 1988, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\ #if 0 static char sccsid[] = "@(#)ching.phx.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: printching.c,v 1.4 2009/08/12 05:40:04 dholland Exp $"); +__RCSID("$NetBSD: printching.c,v 1.5 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -109,7 +109,7 @@ main(int argc, char **argv) hexptr = fgets(hexstr, 6+1, stdin); else hexptr = argv[1]; - if (hexptr == (char *)NULL || strlen(hexptr) != 6) { + if (hexptr == NULL || strlen(hexptr) != 6) { fprintf(stderr, "What kind of a change is THAT?!?\n"); exit(1); } @@ -120,7 +120,7 @@ main(int argc, char **argv) else moving[i] = 0; } - if ((chingf = fopen(_PATH_HEX, "r")) == (FILE *)NULL) { + if ((chingf = fopen(_PATH_HEX, "r")) == NULL) { fprintf(stderr, "ching: can't read %s\n", _PATH_HEX); exit(2); } @@ -227,7 +227,7 @@ phx(int hexagram, int flag) */ rewind(chingf); for (;;) { - if (fgets(textln, sizeof(textln), chingf) == (char *)NULL) { + if (fgets(textln, sizeof(textln), chingf) == NULL) { fprintf(stderr, "ching: Hexagram %d missing\n", hexagram); exit(3); @@ -251,7 +251,7 @@ phx(int hexagram, int flag) */ fputs(textln, stdout); for (;;) { - if (fgets(textln, sizeof(textln), chingf) == (char *)NULL) { + if (fgets(textln, sizeof(textln), chingf) == NULL) { fprintf(stderr, "ching: Hexagram %d malformed\n", hexagram); exit(3); @@ -295,7 +295,7 @@ phx(int hexagram, int flag) else allmoving = 0; for (;;) { - if (fgets(textln, sizeof(textln), chingf) == (char *)NULL) + if (fgets(textln, sizeof(textln), chingf) == NULL) break; lp = &textln[0]; if (*lp++ == '.' && (*lp == 'L' || *lp == 'H')) { @@ -315,7 +315,7 @@ phx(int hexagram, int flag) if (*lp == 'A' && allmoving) { fputs(textln, stdout); for (;;) { - if (fgets(textln, sizeof(textln), chingf) == (char *)NULL) + if (fgets(textln, sizeof(textln), chingf) == NULL) break; lp = &textln[0]; if (*lp++ == '.' || *lp++ == 'H') diff --git a/games/cribbage/instr.c b/games/cribbage/instr.c index aab196ed2e2..9f1376b96b8 100644 --- a/games/cribbage/instr.c +++ b/games/cribbage/instr.c @@ -1,4 +1,4 @@ -/* $NetBSD: instr.c,v 1.12 2005/07/02 08:32:32 jmc Exp $ */ +/* $NetBSD: instr.c,v 1.13 2011/08/31 16:24:55 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.12 2005/07/02 08:32:32 jmc Exp $"); +__RCSID("$NetBSD: instr.c,v 1.13 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -85,7 +85,7 @@ instructions(void) warn("dup2"); _exit(1); } - execl("/bin/sh", "sh", "-c", path, (char *) NULL); + execl("/bin/sh", "sh", "-c", path, NULL); warn(NULL); _exit(1); default: diff --git a/games/fish/fish.c b/games/fish/fish.c index f029e4dc68f..c9a137b9c77 100644 --- a/games/fish/fish.c +++ b/games/fish/fish.c @@ -1,4 +1,4 @@ -/* $NetBSD: fish.c,v 1.20 2009/08/12 05:55:53 dholland Exp $ */ +/* $NetBSD: fish.c,v 1.21 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\ #if 0 static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fish.c,v 1.20 2009/08/12 05:55:53 dholland Exp $"); +__RCSID("$NetBSD: fish.c,v 1.21 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ @@ -112,7 +112,7 @@ main(int argc, char **argv) usage(); } - srandom(time((time_t *)NULL)); + srandom(time(NULL)); instructions(); init(); @@ -456,7 +456,7 @@ instructions(void) err(1, "open %s", _PATH_INSTR); if (dup2(fd, 0) == -1) err(1, "dup2"); - (void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL); + (void)execl("/bin/sh", "sh", "-c", pager, NULL); err(1, "exec sh -c %s", pager); /*NOTREACHED*/ case -1: diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index f753d942bf2..8e6a487a9cb 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.33 2011/08/17 18:17:40 dholland Exp $ */ +/* $NetBSD: strfile.c,v 1.34 2011/08/31 16:24:55 plunky Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: strfile.c,v 1.33 2011/08/17 18:17:40 dholland Exp $"); +__RCSID("$NetBSD: strfile.c,v 1.34 2011/08/31 16:24:55 plunky Exp $"); #endif #endif /* not lint */ #endif /* __NetBSD__ */ @@ -433,7 +433,7 @@ randomize(void) off_t tmp; off_t *sp; - srandom((int)(time((time_t *) NULL) + getpid())); + srandom((int)(time(NULL) + getpid())); Tbl.str_flags |= STR_RANDOM; cnt = Tbl.str_numstr; diff --git a/games/hack/hack.pager.c b/games/hack/hack.pager.c index 5f2c50fd19c..d2e6422b547 100644 --- a/games/hack/hack.pager.c +++ b/games/hack/hack.pager.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.pager.c,v 1.19 2011/08/06 20:42:43 dholland Exp $ */ +/* $NetBSD: hack.pager.c,v 1.20 2011/08/31 16:24:56 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.19 2011/08/06 20:42:43 dholland Exp $"); +__RCSID("$NetBSD: hack.pager.c,v 1.20 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ /* This file contains the command routine dowhatis() and a pager. */ @@ -392,7 +392,7 @@ page_file(const char *fnam, boolean silent) if (!silent) printf("Cannot open %s as stdin.\n", fnam); } else { - execl(catmore, "page", (char *)NULL); + execl(catmore, "page", NULL); if (!silent) printf("Cannot exec %s.\n", catmore); } @@ -428,9 +428,9 @@ dosh(void) char *str; if (child(0)) { if ((str = getenv("SHELL")) != NULL) - execl(str, str, (char *)NULL); + execl(str, str, NULL); else - execl("/bin/sh", "sh", (char *)NULL); + execl("/bin/sh", "sh", NULL); pline("sh: cannot execute."); exit(1); } diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c index 44db67fb414..8e82fefa3a2 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.unix.c,v 1.15 2011/08/06 20:42:43 dholland Exp $ */ +/* $NetBSD: hack.unix.c,v 1.16 2011/08/31 16:24:56 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.15 2011/08/06 20:42:43 dholland Exp $"); +__RCSID("$NetBSD: hack.unix.c,v 1.16 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ /* This file collects some Unix dependencies; hack.pager.c contains some more */ @@ -506,7 +506,7 @@ readmail(void) if (!(mr = getenv("MAILREADER"))) mr = DEF_MAILREADER; if (child(1)) { - execl(mr, mr, (char *)NULL); + execl(mr, mr, NULL); exit(1); } #else /* DEF_MAILREADER */ diff --git a/games/hunt/hunt/hunt.c b/games/hunt/hunt/hunt.c index 5c7e19fc7c9..30bdb55ada3 100644 --- a/games/hunt/hunt/hunt.c +++ b/games/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.39 2011/05/23 22:56:11 joerg Exp $ */ +/* $NetBSD: hunt.c,v 1.40 2011/08/31 16:24:56 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.39 2011/05/23 22:56:11 joerg Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.40 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -624,10 +624,10 @@ start_driver(void) #else if (use_port == NULL) #endif - execl(Driver, "HUNT", (char *) NULL); + execl(Driver, "HUNT", NULL); #ifdef INTERNET else - execl(Driver, "HUNT", "-p", use_port, (char *) NULL); + execl(Driver, "HUNT", "-p", use_port, NULL); #endif /* only get here if exec failed */ (void) kill(getppid(), SIGUSR1); /* tell mom */ diff --git a/games/hunt/huntd/driver.c b/games/hunt/huntd/driver.c index 0abf364a149..23096d77bc5 100644 --- a/games/hunt/huntd/driver.c +++ b/games/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $ */ +/* $NetBSD: driver.c,v 1.21 2011/08/31 16:24:56 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: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $"); +__RCSID("$NetBSD: driver.c,v 1.21 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ #include <sys/ioctl.h> @@ -412,7 +412,7 @@ init(void) fdset[2].fd = -1; #endif - Seed = getpid() + time((time_t *) NULL); + Seed = getpid() + time(NULL); makemaze(); #ifdef BOOTS makeboots(); @@ -662,7 +662,7 @@ zap(PLAYER *pp, FLAG was_player, int i) } if (x > 0) { (void) add_shot(len, pp->p_y, pp->p_x, pp->p_face, x, - (PLAYER *) NULL, TRUE, SPACE); + NULL, TRUE, SPACE); (void) snprintf(Buf, sizeof(Buf), "%s detonated.", pp->p_ident->i_name); for (np = Player; np < End_player; np++) @@ -710,7 +710,7 @@ zap(PLAYER *pp, FLAG was_player, int i) y = rand_num(HEIGHT / 2) + HEIGHT / 4; } while (Maze[y][x] != SPACE); (void) add_shot(LAVA, y, x, LEFTS, volcano, - (PLAYER *) NULL, TRUE, SPACE); + NULL, TRUE, SPACE); for (np = Player; np < End_player; np++) message(np, "Volcano eruption."); volcano = 0; @@ -726,7 +726,7 @@ zap(PLAYER *pp, FLAG was_player, int i) add_shot(DSHOT, y, x, rand_dir(), shot_req[MINDSHOT + rand_num(MAXBOMB - MINDSHOT)], - (PLAYER *) NULL, FALSE, SPACE); + NULL, FALSE, SPACE); } #endif diff --git a/games/hunt/huntd/execute.c b/games/hunt/huntd/execute.c index a99cccd4dc2..e3e5ba2b4ce 100644 --- a/games/hunt/huntd/execute.c +++ b/games/hunt/huntd/execute.c @@ -1,4 +1,4 @@ -/* $NetBSD: execute.c,v 1.9 2009/07/04 04:29:54 dholland Exp $ */ +/* $NetBSD: execute.c,v 1.10 2011/08/31 16:24:56 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: execute.c,v 1.9 2009/07/04 04:29:54 dholland Exp $"); +__RCSID("$NetBSD: execute.c,v 1.10 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -566,8 +566,7 @@ pickup(PLAYER *pp, int y, int x, int prob, int obj) abort(); } if (rand_num(100) < prob) - add_shot(obj, y, x, LEFTS, req, (PLAYER *) NULL, - TRUE, pp->p_face); + add_shot(obj, y, x, LEFTS, req, NULL, TRUE, pp->p_face); else { pp->p_ammo += req; (void) snprintf(Buf, sizeof(Buf), "%3d", pp->p_ammo); diff --git a/games/hunt/huntd/shots.c b/games/hunt/huntd/shots.c index ad655e2e250..7a5192fcaa5 100644 --- a/games/hunt/huntd/shots.c +++ b/games/hunt/huntd/shots.c @@ -1,4 +1,4 @@ -/* $NetBSD: shots.c,v 1.11 2009/07/04 06:19:05 dholland Exp $ */ +/* $NetBSD: shots.c,v 1.12 2011/08/31 16:24:56 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: shots.c,v 1.11 2009/07/04 06:19:05 dholland Exp $"); +__RCSID("$NetBSD: shots.c,v 1.12 2011/08/31 16:24:56 plunky Exp $"); #endif /* not lint */ #include <err.h> @@ -631,7 +631,7 @@ again: #ifdef BOOTS if (pp->p_face != BOOT && pp->p_face != BOOT_PAIR) { #endif - checkdam(pp, (PLAYER *) NULL, (IDENT *) NULL, + checkdam(pp, NULL, NULL, rand_num(pp->p_damage / 5), FALL); pp->p_face = rand_dir(); showstat(pp); @@ -732,7 +732,7 @@ chkshot(BULLET *bp, BULLET *next) y, x, LEFTS, (Maze[y][x] == GMINE) ? GRENREQ : BULREQ, - (PLAYER *) NULL, TRUE, SPACE); + NULL, TRUE, SPACE); Maze[y][x] = SPACE; break; } diff --git a/games/mille/mille.c b/games/mille/mille.c index 41b407b1ea9..10857a8da80 100644 --- a/games/mille/mille.c +++ b/games/mille/mille.c @@ -1,4 +1,4 @@ -/* $NetBSD: mille.c,v 1.19 2009/05/25 23:41:23 dholland Exp $ */ +/* $NetBSD: mille.c,v 1.20 2011/08/31 16:24:56 plunky Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: mille.c,v 1.19 2009/05/25 23:41:23 dholland Exp $"); +__RCSID("$NetBSD: mille.c,v 1.20 2011/08/31 16:24:56 plunky Exp $"); #endif #endif /* not lint */ @@ -61,7 +61,7 @@ main(int ac, char *av[]) if (strcmp(av[0], "a.out") == 0) { outf = fopen("q", "w"); - setbuf(outf, (char *)NULL); + setbuf(outf, NULL); Debug = TRUE; } restore = FALSE; diff --git a/games/mille/move.c b/games/mille/move.c index 060d118c288..c8631f0a728 100644 --- a/games/mille/move.c +++ b/games/mille/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $ */ +/* $NetBSD: move.c,v 1.18 2011/08/31 16:24:56 plunky Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $"); +__RCSID("$NetBSD: move.c,v 1.18 2011/08/31 16:24:56 plunky Exp $"); #endif #endif /* not lint */ @@ -469,7 +469,7 @@ over: leaveok(Board, TRUE); if ((outf = fopen(buf, "w")) == NULL) warn("%s", buf); - setbuf(outf, (char *)NULL); + setbuf(outf, NULL); } Debug = !Debug; break; diff --git a/games/mille/varpush.c b/games/mille/varpush.c index 3835c475c01..333b66fdde4 100644 --- a/games/mille/varpush.c +++ b/games/mille/varpush.c @@ -1,4 +1,4 @@ -/* $NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $ */ +/* $NetBSD: varpush.c,v 1.12 2011/08/31 16:24:56 plunky Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)varpush.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $"); +__RCSID("$NetBSD: varpush.c,v 1.12 2011/08/31 16:24:56 plunky Exp $"); #endif #endif /* not lint */ @@ -90,7 +90,7 @@ over: goto over; } if (strcmp(buf, _PATH_DEVNULL) != 0) - setbuf(outf, (char *)NULL); + setbuf(outf, NULL); } #endif } else { diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c index 663bf519450..5dd4d8ee6a1 100644 --- a/games/phantasia/misc.c +++ b/games/phantasia/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.19 2009/08/31 08:27:16 dholland Exp $ */ +/* $NetBSD: misc.c,v 1.20 2011/08/31 16:24:56 plunky Exp $ */ /* * misc.c Phantasia miscellaneous support routines @@ -682,7 +682,7 @@ death(const char *how) if (ch == 'Y') { cleanup(FALSE); execl(_PATH_GAMEPROG, "phantasia", "-s", - (Wizard ? "-S" : (char *) NULL), (char *) NULL); + (Wizard ? "-S" : NULL), NULL); exit(0); /* NOTREACHED */ } diff --git a/games/rogue/machdep.c b/games/rogue/machdep.c index 8f66ef9e6fc..531c175e473 100644 --- a/games/rogue/machdep.c +++ b/games/rogue/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.17 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: machdep.c,v 1.18 2011/08/31 16:24:56 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.17 2008/01/14 03:50:01 dholland Exp $"); +__RCSID("$NetBSD: machdep.c,v 1.18 2011/08/31 16:24:56 plunky Exp $"); #endif #endif /* not lint */ @@ -481,7 +481,7 @@ md_shell(const char *shell) case -1: break; case 0: - execl(shell, shell, (char *)NULL); + execl(shell, shell, NULL); _exit(255); default: waitpid(pid, &w, 0); diff --git a/games/tetris/tetris.c b/games/tetris/tetris.c index 7202cb31626..4943249afe2 100644 --- a/games/tetris/tetris.c +++ b/games/tetris/tetris.c @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.c,v 1.23 2010/12/05 04:34:23 pgoyette Exp $ */ +/* $NetBSD: tetris.c,v 1.24 2011/08/31 16:24:56 plunky Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -259,7 +259,7 @@ main(int argc, char *argv[]) scr_msg(key_msg, 0); scr_msg(msg, 1); (void) fflush(stdout); - } while (rwait((struct timeval *)NULL) == -1); + } while (rwait(NULL) == -1); scr_msg(msg, 0); scr_msg(key_msg, 1); place(curshape, pos, 0); diff --git a/games/worms/worms.c b/games/worms/worms.c index ebdf290ecc3..03c26f3b76c 100644 --- a/games/worms/worms.c +++ b/games/worms/worms.c @@ -1,4 +1,4 @@ -/* $NetBSD: worms.c,v 1.20 2009/08/12 08:57:30 dholland Exp $ */ +/* $NetBSD: worms.c,v 1.21 2011/08/31 16:24:56 plunky Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\ #if 0 static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: worms.c,v 1.20 2009/08/12 08:57:30 dholland Exp $"); +__RCSID("$NetBSD: worms.c,v 1.21 2011/08/31 16:24:56 plunky Exp $"); #endif #endif /* not lint */ @@ -206,7 +206,7 @@ main(argc, argv) while ((ch = getopt(argc, argv, "d:fl:n:t")) != -1) switch(ch) { case 'd': - if ((delay = (unsigned int)strtoul(optarg, (char **)NULL, 10)) < 1 || delay > 1000) + if ((delay = (unsigned int)strtoul(optarg, NULL, 10)) < 1 || delay > 1000) errx(1, "invalid delay (1-1000)"); delay *= 1000; /* ms -> us */ break; diff --git a/games/wump/wump.c b/games/wump/wump.c index 71b8ce03844..770aebaba86 100644 --- a/games/wump/wump.c +++ b/games/wump/wump.c @@ -1,4 +1,4 @@ -/* $NetBSD: wump.c,v 1.27 2010/05/29 22:56:01 dholland Exp $ */ +/* $NetBSD: wump.c,v 1.28 2011/08/31 16:24:57 plunky Exp $ */ /* * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: wump.c,v 1.27 2010/05/29 22:56:01 dholland Exp $"); +__RCSID("$NetBSD: wump.c,v 1.28 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ @@ -781,7 +781,7 @@ puff of greasy black smoke! (poof)\n"); err(1, "open %s", _PATH_WUMPINFO); if (dup2(fd, STDIN_FILENO) == -1) err(1, "dup2"); - (void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL); + (void)execl("/bin/sh", "sh", "-c", pager, NULL); err(1, "exec sh -c %s", pager); case -1: err(1, "fork"); diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 1993dd6dc40..350c66e96d2 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -1,4 +1,4 @@ -/* $NetBSD: chpass.c,v 1.34 2011/08/29 14:08:39 joerg Exp $ */ +/* $NetBSD: chpass.c,v 1.35 2011/08/31 16:24:57 plunky Exp $ */ /*- * Copyright (c) 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\ #if 0 static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: chpass.c,v 1.34 2011/08/29 14:08:39 joerg Exp $"); +__RCSID("$NetBSD: chpass.c,v 1.35 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ @@ -244,7 +244,7 @@ main(int argc, char **argv) #ifdef YP if (use_yp) { if (pw_yp(pw, uid)) - yppw_error((char *)NULL, 0, 1); + yppw_error(NULL, 0, 1); else exit(0); /* Will not exit from this if. */ diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index c61ddb7bcfe..5c11e655334 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.20 2009/04/11 12:10:02 lukem Exp $ */ +/* $NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: edit.c,v 1.20 2009/04/11 12:10:02 lukem Exp $"); +__RCSID("$NetBSD: edit.c,v 1.21 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ @@ -218,5 +218,5 @@ bad: (void)fclose(fp); warnx("entries too long"); return (0); } - return (pw_scan(buf, pw, (int *)NULL)); + return (pw_scan(buf, pw, NULL)); } diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index fb12a4d0df5..ded42b399d2 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -1,4 +1,4 @@ -/* $NetBSD: col.c,v 1.16 2011/08/30 21:33:28 joerg Exp $ */ +/* $NetBSD: col.c,v 1.17 2011/08/31 16:24:57 plunky Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\ #if 0 static char sccsid[] = "@(#)col.c 8.5 (Berkeley) 5/4/95"; #endif -__RCSID("$NetBSD: col.c,v 1.16 2011/08/30 21:33:28 joerg Exp $"); +__RCSID("$NetBSD: col.c,v 1.17 2011/08/31 16:24:57 plunky Exp $"); #endif /* not lint */ #include <ctype.h> @@ -485,7 +485,7 @@ alloc_line(void) int i; if (!line_freelist) { - l = (LINE *)xmalloc((void *)NULL, sizeof(LINE) * NALLOC); + l = (LINE *)xmalloc(NULL, sizeof(LINE) * NALLOC); line_freelist = l; for (i = 1; i < NALLOC; i++, l++) l->l_next = l + 1; diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c index 00a4cce73f3..23b7cfe6712 100644 --- a/usr.bin/find/ls.c +++ b/usr.bin/find/ls.c @@ -1,4 +1,4 @@ -/* $NetBSD: ls.c,v 1.20 2008/12/29 00:53:43 christos Exp $ */ +/* $NetBSD: ls.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */ /* * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)ls.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: ls.c,v 1.20 2008/12/29 00:53:43 christos Exp $"); +__RCSID("$NetBSD: ls.c,v 1.21 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ @@ -98,7 +98,7 @@ printtime(time_t ftime) (void)putchar(longstring[i]); #define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY) - if (ftime + SIXMONTHS > time((time_t *)NULL)) + if (ftime + SIXMONTHS > time(NULL)) for (i = 11; i < 16; ++i) (void)putchar(longstring[i]); else { diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index 5748fb07997..e3c6be17a89 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -1,4 +1,4 @@ -/* $NetBSD: queue.c,v 1.4 2011/04/18 03:47:40 joerg Exp $ */ +/* $NetBSD: queue.c,v 1.5 2011/08/31 16:24:57 plunky Exp $ */ /* $FreeBSD: head/usr.bin/grep/queue.c 211496 2010-08-19 09:28:59Z des $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -36,7 +36,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: queue.c,v 1.4 2011/04/18 03:47:40 joerg Exp $"); +__RCSID("$NetBSD: queue.c,v 1.5 2011/08/31 16:24:57 plunky Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -98,7 +98,7 @@ printqueue(void) struct qentry *item; while ((item = dequeue()) != NULL) { - printline(&item->data, '-', (regmatch_t *)NULL, 0); + printline(&item->data, '-', NULL, 0); free(item->data.dat); free(item); } diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 5cd17510811..d741f692359 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -1,4 +1,4 @@ -/* $NetBSD: login.c,v 1.97 2009/12/29 19:26:13 christos Exp $ */ +/* $NetBSD: login.c,v 1.98 2011/08/31 16:24:57 plunky Exp $ */ /*- * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994\ #if 0 static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -__RCSID("$NetBSD: login.c,v 1.97 2009/12/29 19:26:13 christos Exp $"); +__RCSID("$NetBSD: login.c,v 1.98 2011/08/31 16:24:57 plunky Exp $"); #endif /* not lint */ /* @@ -524,7 +524,7 @@ main(int argc, char *argv[]) _PASSWORD_WARNDAYS * SECSPERDAY); #endif - (void)gettimeofday(&now, (struct timezone *)NULL); + (void)gettimeofday(&now, NULL); if (pwd->pw_expire) { if (now.tv_sec >= pwd->pw_expire) { (void)printf("Sorry -- your account has expired.\n"); diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index e049d403577..11e6d861edd 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.178 2011/05/17 21:56:51 dsl Exp $ */ +/* $NetBSD: parse.c,v 1.179 2011/08/31 16:24:57 plunky Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.178 2011/05/17 21:56:51 dsl Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.179 2011/08/31 16:24:57 plunky Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.178 2011/05/17 21:56:51 dsl Exp $"); +__RCSID("$NetBSD: parse.c,v 1.179 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ #endif @@ -1174,7 +1174,7 @@ ParseDoDependency(char *line) tOp = 0; specType = Not; - paths = (Lst)NULL; + paths = NULL; curTargs = Lst_Init(FALSE); @@ -1344,7 +1344,7 @@ ParseDoDependency(char *line) &line[5]); goto out; } else { - if (paths == (Lst)NULL) { + if (paths == NULL) { paths = Lst_Init(FALSE); } (void)Lst_AtEnd(paths, path); diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index b9f195535be..9d680ead013 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -1,4 +1,4 @@ -/* $NetBSD: msgs.c,v 1.20 2009/04/12 14:31:02 lukem Exp $ */ +/* $NetBSD: msgs.c,v 1.21 2011/08/31 16:24:57 plunky Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\ #if 0 static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: msgs.c,v 1.20 2009/04/12 14:31:02 lukem Exp $"); +__RCSID("$NetBSD: msgs.c,v 1.21 2011/08/31 16:24:57 plunky Exp $"); #endif #endif /* not lint */ @@ -647,7 +647,7 @@ prmesg(length) if (!outf) outf = stdout; else - setbuf(outf, (char *)NULL); + setbuf(outf, NULL); } else outf = stdout; diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index c4cbbc4f00a..9d009371cb7 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -1,4 +1,4 @@ -/* $NetBSD: local_passwd.c,v 1.34 2010/03/02 16:19:13 gdt Exp $ */ +/* $NetBSD: local_passwd.c,v 1.35 2011/08/31 16:24:58 plunky Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)local_passwd.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: local_passwd.c,v 1.34 2010/03/02 16:19:13 gdt Exp $"); +__RCSID("$NetBSD: local_passwd.c,v 1.35 2011/08/31 16:24:58 plunky Exp $"); #endif #endif /* not lint */ @@ -217,7 +217,7 @@ pwlocal_process(const char *username, int argc, char **argv) pw_copy(pfd, tfd, pw, &old_pw); if (pw_mkdb(username, old_change == pw->pw_change) < 0) - pw_error((char *)NULL, 0, 1); + pw_error(NULL, 0, 1); syslog(LOG_AUTH | LOG_INFO, "user %s (UID %lu) successfully changed " @@ -328,7 +328,7 @@ local_chpw(uname) pw_copy(pfd, tfd, pw, &old_pw); if (pw_mkdb(uname, old_change == pw->pw_change) < 0) - pw_error((char *)NULL, 0, 1); + pw_error(NULL, 0, 1); syslog(LOG_AUTH | LOG_INFO, "user %s (UID %lu) successfully changed " diff --git a/usr.bin/radioctl/radioctl.c b/usr.bin/radioctl/radioctl.c index 7f22b3b3766..ca4ac129c5e 100644 --- a/usr.bin/radioctl/radioctl.c +++ b/usr.bin/radioctl/radioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: radioctl.c,v 1.11 2011/08/21 08:57:40 christos Exp $ */ +/* $NetBSD: radioctl.c,v 1.12 2011/08/31 16:24:58 plunky Exp $ */ /* $OpenBSD: radioctl.c,v 1.5 2001/12/18 18:42:19 mickey Exp $ */ /* $RuOBSD: radioctl.c,v 1.4 2001/10/20 18:09:10 pva Exp $ */ @@ -29,7 +29,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: radioctl.c,v 1.11 2011/08/21 08:57:40 christos Exp $"); +__RCSID("$NetBSD: radioctl.c,v 1.12 2011/08/31 16:24:58 plunky Exp $"); #endif #include <sys/ioctl.h> @@ -349,7 +349,7 @@ str_to_long(char *str, int optval) if (optval == OPTION_FREQUENCY) val = (u_long)1000 * atof(str); else - val = (u_long)strtol(str, (char **)NULL, 10); + val = (u_long)strtol(str, NULL, 10); return val; } diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c index b3e5f9ef825..d865d4fb671 100644 --- a/usr.bin/rpcgen/rpc_cout.c +++ b/usr.bin/rpcgen/rpc_cout.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_cout.c,v 1.29 2006/05/11 17:11:57 mrg Exp $ */ +/* $NetBSD: rpc_cout.c,v 1.30 2011/08/31 16:24:58 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_cout.c,v 1.29 2006/05/11 17:11:57 mrg Exp $"); +__RCSID("$NetBSD: rpc_cout.c,v 1.30 2011/08/31 16:24:58 plunky Exp $"); #endif #endif @@ -753,7 +753,7 @@ upcase(str) ptr = (char *) malloc(strlen(str) + 1); - if (ptr == (char *) NULL) { + if (ptr == NULL) { f_print(stderr, "malloc failed\n"); exit(1); }; diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index c341abc5c07..bd3256e7665 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_main.c,v 1.33 2009/04/13 06:42:25 lukem Exp $ */ +/* $NetBSD: rpc_main.c,v 1.34 2011/08/31 16:24:58 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_main.c,v 1.33 2009/04/13 06:42:25 lukem Exp $"); +__RCSID("$NetBSD: rpc_main.c,v 1.34 2011/08/31 16:24:58 plunky Exp $"); #endif #endif @@ -373,7 +373,7 @@ open_input(infile, define) putarg(1, CPPFLAGS); addarg(define); addarg(infile); - addarg((char *) NULL); + addarg(NULL); (void) close(1); (void) dup2(pd[1], 1); (void) close(pd[0]); diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 84c856f3242..5b239f728ec 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_svcout.c,v 1.22 2004/06/20 22:20:16 jmc Exp $ */ +/* $NetBSD: rpc_svcout.c,v 1.23 2011/08/31 16:24:58 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_svcout.c,v 1.22 2004/06/20 22:20:16 jmc Exp $"); +__RCSID("$NetBSD: rpc_svcout.c,v 1.23 2011/08/31 16:24:58 plunky Exp $"); #endif #endif @@ -122,7 +122,7 @@ write_most(infile, netflag, nomain) write_svc_aux(nomain); } /* write out dispatcher and stubs */ - write_programs(nomain ? (char *) NULL : "static"); + write_programs(nomain ? NULL : "static"); if (nomain) return; @@ -253,7 +253,7 @@ write_rest() { f_print(fout, "\n"); if (inetdflag) { - f_print(fout, "\tif (%s == (SVCXPRT *)NULL) {\n", TRANSP); + f_print(fout, "\tif (%s == NULL) {\n", TRANSP); (void) sprintf(_errbuf, "could not create a handle"); print_err_message("\t\t"); f_print(fout, "\t\texit(1);\n"); @@ -493,10 +493,10 @@ write_program(def, storage) f_print(fout, "\tcase NULLPROC:\n"); if (Cflag) { f_print(fout, - "\t\t(void) svc_sendreply(%s, (xdrproc_t)xdr_void, (char *)NULL);\n", TRANSP); + "\t\t(void) svc_sendreply(%s, (xdrproc_t)xdr_void, NULL);\n", TRANSP); } else { f_print(fout, - "\t\t(void) svc_sendreply(%s, xdr_void, (char *)NULL);\n", + "\t\t(void) svc_sendreply(%s, xdr_void, NULL);\n", TRANSP); } print_return("\t\t"); @@ -951,7 +951,7 @@ write_rpc_svc_fg(infile, sp) else { f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp); f_print(fout, "%sif (i >= 0) {\n", sp); - f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp); + f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, NULL);\n", sp); f_print(fout, "%s\t(void) close(i);\n", sp); f_print(fout, "%s}\n", sp); } diff --git a/usr.bin/rpcgen/rpc_tblout.c b/usr.bin/rpcgen/rpc_tblout.c index 84c547c8fcc..eb1ba8cfbef 100644 --- a/usr.bin/rpcgen/rpc_tblout.c +++ b/usr.bin/rpcgen/rpc_tblout.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_tblout.c,v 1.11 2004/06/20 22:20:16 jmc Exp $ */ +/* $NetBSD: rpc_tblout.c,v 1.12 2011/08/31 16:24:58 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI"; #else -__RCSID("$NetBSD: rpc_tblout.c,v 1.11 2004/06/20 22:20:16 jmc Exp $"); +__RCSID("$NetBSD: rpc_tblout.c,v 1.12 2011/08/31 16:24:58 plunky Exp $"); #endif #endif @@ -140,7 +140,7 @@ write_table(def) /* argument info */ if (proc->arg_num > 1) - printit((char *) NULL, proc->args.argname); + printit(NULL, proc->args.argname); else /* do we have to do something special for * newstyle */ diff --git a/usr.bin/rpcgen/rpc_util.c b/usr.bin/rpcgen/rpc_util.c index 20aabec1f45..8c647f8d409 100644 --- a/usr.bin/rpcgen/rpc_util.c +++ b/usr.bin/rpcgen/rpc_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_util.c,v 1.10 2004/06/20 22:20:16 jmc Exp $ */ +/* $NetBSD: rpc_util.c,v 1.11 2011/08/31 16:24:58 plunky Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_util.c,v 1.10 2004/06/20 22:20:16 jmc Exp $"); +__RCSID("$NetBSD: rpc_util.c,v 1.11 2011/08/31 16:24:58 plunky Exp $"); #endif #endif @@ -482,7 +482,7 @@ add_type(len, type) { bas_type *ptr; - if ((ptr = (bas_type *) malloc(sizeof(bas_type))) == (bas_type *) NULL) { + if ((ptr = (bas_type *) malloc(sizeof(bas_type))) == NULL) { fprintf(stderr, "failed in malloc"); exit(1); } diff --git a/usr.bin/sdiff/edit.c b/usr.bin/sdiff/edit.c index df628220ce1..ff56a5ea74e 100644 --- a/usr.bin/sdiff/edit.c +++ b/usr.bin/sdiff/edit.c @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.2 2009/04/13 07:18:38 lukem Exp $ */ +/* $NetBSD: edit.c,v 1.3 2011/08/31 16:24:58 plunky Exp $ */ /* $OpenBSD: edit.c,v 1.14 2006/05/25 03:20:32 ray Exp $ */ /* @@ -41,7 +41,7 @@ edit(const char *filename) switch (pid = fork()) { case 0: /* child */ - execlp(editor, editor, filename, (void *)NULL); + execlp(editor, editor, filename, NULL); warn("could not execute editor: %s", editor); cleanup(filename); case -1: diff --git a/usr.bin/shlock/shlock.c b/usr.bin/shlock/shlock.c index a44a7ed2ad5..d48d89cf565 100644 --- a/usr.bin/shlock/shlock.c +++ b/usr.bin/shlock/shlock.c @@ -1,4 +1,4 @@ -/* $NetBSD: shlock.c,v 1.10 2008/04/28 20:24:14 martin Exp $ */ +/* $NetBSD: shlock.c,v 1.11 2011/08/31 16:24:58 plunky Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: shlock.c,v 1.10 2008/04/28 20:24:14 martin Exp $"); +__RCSID("$NetBSD: shlock.c,v 1.11 2011/08/31 16:24:58 plunky Exp $"); #endif #include <sys/types.h> @@ -125,7 +125,7 @@ xtmpfile(char *file, __pid_t pid, int uucpstyle) static char tempname[BUFSIZ]; sprintf(buf, "shlock%ld", (u_long)getpid()); - if ((cp = strrchr(strcpy(tempname, file), '/')) != (char *)NULL) { + if ((cp = strrchr(strcpy(tempname, file), '/')) != NULL) { *++cp = '\0'; (void) strcat(tempname, buf); } else @@ -143,7 +143,7 @@ openloop: if (unlink(tempname) < 0) { fprintf(stderr, E_unlk, Pname, tempname, strerror(errno)); - return((char *)NULL); + return (NULL); } /* ** Further profanity @@ -152,7 +152,7 @@ openloop: default: fprintf(stderr, E_open, Pname, tempname, strerror(errno)); - return((char *)NULL); + return (NULL); } } @@ -172,7 +172,7 @@ openloop: fprintf(stderr, E_unlk, Pname, tempname, strerror(errno)); } - return((char *)NULL); + return (NULL); } (void) close(fd); return(tempname); @@ -258,7 +258,7 @@ mklock(char *file, __pid_t pid, int uucpstyle) dprintf("%s: trying lock <%s> for process %ld\n", Pname, file, (u_long)pid); - if ((tmp = xtmpfile(file, pid, uucpstyle)) == (char *)NULL) + if ((tmp = xtmpfile(file, pid, uucpstyle)) == NULL) return(FALSE); linkloop: @@ -309,7 +309,7 @@ int main(int ac, char **av) { int x; - char *file = (char *)NULL; + char *file = NULL; pid_t pid = 0; int uucpstyle = FALSE; /* indicating UUCP style locks */ int only_check = TRUE; /* don't make a lock */ @@ -352,7 +352,7 @@ main(int ac, char **av) } } - if (file == (char *)NULL || (!only_check && pid <= 0)) { + if (file == NULL || (!only_check && pid <= 0)) { bad_usage(); } diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 18a8dcac8bc..eeba32c12d0 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $NetBSD: su.c,v 1.68 2008/07/21 14:19:26 lukem Exp $ */ +/* $NetBSD: su.c,v 1.69 2011/08/31 16:24:58 plunky Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988\ #if 0 static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/ #else -__RCSID("$NetBSD: su.c,v 1.68 2008/07/21 14:19:26 lukem Exp $"); +__RCSID("$NetBSD: su.c,v 1.69 2011/08/31 16:24:58 plunky Exp $"); #endif #endif /* not lint */ @@ -399,7 +399,7 @@ main(int argc, char **argv) #ifdef BSD4_4 if (pwd->pw_change || pwd->pw_expire) - (void)gettimeofday(&tp, (struct timezone *)NULL); + (void)gettimeofday(&tp, NULL); if (pwd->pw_change) { if (tp.tv_sec >= pwd->pw_change) { (void)printf("%s -- %s's password has expired.\n", diff --git a/usr.bin/talk/get_addrs.c b/usr.bin/talk/get_addrs.c index a3060d7e827..e40e4f268fa 100644 --- a/usr.bin/talk/get_addrs.c +++ b/usr.bin/talk/get_addrs.c @@ -1,4 +1,4 @@ -/* $NetBSD: get_addrs.c,v 1.8 2003/08/07 11:16:04 agc Exp $ */ +/* $NetBSD: get_addrs.c,v 1.9 2011/08/31 16:24:58 plunky Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)get_addrs.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: get_addrs.c,v 1.8 2003/08/07 11:16:04 agc Exp $"); +__RCSID("$NetBSD: get_addrs.c,v 1.9 2011/08/31 16:24:58 plunky Exp $"); #endif /* not lint */ #include "talk.h" @@ -56,7 +56,7 @@ get_addrs(my_machine_name, his_machine_name) hp = gethostbyname(my_machine_name); if (hp == NULL) { fprintf(stderr, "talk: %s: ", my_machine_name); - herror((char *)NULL); + herror(NULL); exit(1); } memmove((char *)&my_machine_addr, hp->h_addr, hp->h_length); @@ -68,7 +68,7 @@ get_addrs(my_machine_name, his_machine_name) hp = gethostbyname(his_machine_name); if (hp == NULL) { fprintf(stderr, "talk: %s: ", his_machine_name); - herror((char *)NULL); + herror(NULL); exit(1); } memmove((char *) &his_machine_addr, hp->h_addr, hp->h_length); diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 7b473bd5c6e..9b3850deade 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $NetBSD: time.c,v 1.20 2011/08/28 08:24:42 christos Exp $ */ +/* $NetBSD: time.c,v 1.21 2011/08/31 16:24:58 plunky Exp $ */ /* * Copyright (c) 1987, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1988, 1993\ #if 0 static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: time.c,v 1.20 2011/08/28 08:24:42 christos Exp $"); +__RCSID("$NetBSD: time.c,v 1.21 2011/08/31 16:24:58 plunky Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -105,7 +105,7 @@ main(int argc, char ** volatile argv) if (argc < 1) usage(); - gettimeofday(&before, (struct timezone *)NULL); + gettimeofday(&before, NULL); switch(pid = vfork()) { case -1: /* error */ err(EXIT_FAILURE, "Vfork failed"); @@ -122,7 +122,7 @@ main(int argc, char ** volatile argv) (void)signal(SIGQUIT, SIG_IGN); if ((pid = wait4(pid, &status, 0, &ru)) == -1) err(EXIT_FAILURE, "wait4 %d failed", pid); - (void)gettimeofday(&after, (struct timezone *)NULL); + (void)gettimeofday(&after, NULL); if (!WIFEXITED(status)) warnx("Command terminated abnormally."); timersub(&after, &before, &after); diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 9b0a1d056a1..7059b4c5460 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -1,4 +1,4 @@ -/* $NetBSD: write.c,v 1.25 2008/07/21 14:19:28 lukem Exp $ */ +/* $NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)write.c 8.2 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: write.c,v 1.25 2008/07/21 14:19:28 lukem Exp $"); +__RCSID("$NetBSD: write.c,v 1.26 2011/08/31 16:24:58 plunky Exp $"); #endif #endif /* not lint */ @@ -242,7 +242,7 @@ do_write(int ttyfd, const char *mytty, const uid_t myuid) (void)strlcpy(host, "???", sizeof(host)); else host[sizeof(host) - 1] = '\0'; - now = time((time_t *)NULL); + now = time(NULL); nows = ctime(&now); nows[16] = '\0'; (void)printf("\r\n\a\a\aMessage from %s@%s on %s at %s ...\r\n", 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; |
