From e4a1f12e7e44b2b62ece74c9ea36354fa944acf9 Mon Sep 17 00:00:00 2001 From: plunky Date: Wed, 31 Aug 2011 16:24:54 +0000 Subject: NULL does not need a cast --- adventure/init.c | 6 +++--- arithmetic/arithmetic.c | 6 +++--- boggle/boggle/help.c | 6 +++--- boggle/boggle/mach.c | 6 +++--- ching/printching/printching.c | 16 ++++++++-------- cribbage/instr.c | 6 +++--- fish/fish.c | 8 ++++---- fortune/strfile/strfile.c | 6 +++--- hack/hack.pager.c | 10 +++++----- hack/hack.unix.c | 6 +++--- hunt/hunt/hunt.c | 8 ++++---- hunt/huntd/driver.c | 12 ++++++------ hunt/huntd/execute.c | 7 +++---- hunt/huntd/shots.c | 8 ++++---- mille/mille.c | 6 +++--- mille/move.c | 6 +++--- mille/varpush.c | 6 +++--- phantasia/misc.c | 4 ++-- rogue/machdep.c | 6 +++--- tetris/tetris.c | 4 ++-- worms/worms.c | 6 +++--- wump/wump.c | 6 +++--- 22 files changed, 77 insertions(+), 78 deletions(-) diff --git a/adventure/init.c b/adventure/init.c index 4d289e64..bb316c51 100644 --- a/adventure/init.c +++ b/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/arithmetic/arithmetic.c b/arithmetic/arithmetic.c index 696208c6..bd6c8141 100644 --- a/arithmetic/arithmetic.c +++ b/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/boggle/boggle/help.c b/boggle/boggle/help.c index 365431f0..03106834 100644 --- a/boggle/boggle/help.c +++ b/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/boggle/boggle/mach.c b/boggle/boggle/mach.c index 823c738d..d9f9e348 100644 --- a/boggle/boggle/mach.c +++ b/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/ching/printching/printching.c b/ching/printching/printching.c index 54c08921..bde10689 100644 --- a/ching/printching/printching.c +++ b/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/cribbage/instr.c b/cribbage/instr.c index aab196ed..9f1376b9 100644 --- a/cribbage/instr.c +++ b/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/fish/fish.c b/fish/fish.c index f029e4dc..c9a137b9 100644 --- a/fish/fish.c +++ b/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/fortune/strfile/strfile.c b/fortune/strfile/strfile.c index f753d942..8e6a487a 100644 --- a/fortune/strfile/strfile.c +++ b/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/hack/hack.pager.c b/hack/hack.pager.c index 5f2c50fd..d2e6422b 100644 --- a/hack/hack.pager.c +++ b/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 #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/hack/hack.unix.c b/hack/hack.unix.c index 44db67fb..8e82fefa 100644 --- a/hack/hack.unix.c +++ b/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 #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/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 5c7e19fc..30bdb55a 100644 --- a/hunt/hunt/hunt.c +++ b/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 #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 @@ -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/hunt/huntd/driver.c b/hunt/huntd/driver.c index 0abf364a..23096d77 100644 --- a/hunt/huntd/driver.c +++ b/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 #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 @@ -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/hunt/huntd/execute.c b/hunt/huntd/execute.c index a99cccd4..e3e5ba2b 100644 --- a/hunt/huntd/execute.c +++ b/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 #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 @@ -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/hunt/huntd/shots.c b/hunt/huntd/shots.c index ad655e2e..7a5192fc 100644 --- a/hunt/huntd/shots.c +++ b/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 #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 @@ -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/mille/mille.c b/mille/mille.c index 41b407b1..10857a8d 100644 --- a/mille/mille.c +++ b/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/mille/move.c b/mille/move.c index 060d118c..c8631f0a 100644 --- a/mille/move.c +++ b/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/mille/varpush.c b/mille/varpush.c index 3835c475..333b66fd 100644 --- a/mille/varpush.c +++ b/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/phantasia/misc.c b/phantasia/misc.c index 663bf519..5dd4d8ee 100644 --- a/phantasia/misc.c +++ b/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/rogue/machdep.c b/rogue/machdep.c index 8f66ef9e..531c175e 100644 --- a/rogue/machdep.c +++ b/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/tetris/tetris.c b/tetris/tetris.c index 7202cb31..4943249a 100644 --- a/tetris/tetris.c +++ b/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/worms/worms.c b/worms/worms.c index ebdf290e..03c26f3b 100644 --- a/worms/worms.c +++ b/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/wump/wump.c b/wump/wump.c index 71b8ce03..770aebab 100644 --- a/wump/wump.c +++ b/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"); -- cgit v1.2.3-56-ge451