diff options
author | mestre <mestre@cvs.openbsd.org> | 2016-01-10 14:10:40 +0000 |
---|---|---|
committer | mestre <mestre@cvs.openbsd.org> | 2016-01-10 14:10:40 +0000 |
commit | 8234c650dfd9324e5ad665576479d6da21fea2db (patch) | |
tree | 6db7203807d5437fbcdb1dc4994b1771da012b67 /games | |
parent | 1ff71698b00a0496a82edb13ea27e66fe35c1677 (diff) |
Remove needless casts to (char *) NULL. Some were kept, namely for execl(3)
last arguments since "The list of arguments must be terminated by a null
null pointer" of type char *
Suggested by and OK tb@
Diffstat (limited to 'games')
-rw-r--r-- | games/boggle/boggle/help.c | 4 | ||||
-rw-r--r-- | games/boggle/boggle/mach.c | 4 | ||||
-rw-r--r-- | games/bs/bs.c | 8 | ||||
-rw-r--r-- | games/hunt/hunt/hunt.c | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/games/boggle/boggle/help.c b/games/boggle/boggle/help.c index 764c54d2606..9fbf0986514 100644 --- a/games/boggle/boggle/help.c +++ b/games/boggle/boggle/help.c @@ -1,4 +1,4 @@ -/* $OpenBSD: help.c,v 1.6 2016/01/10 13:18:07 mestre Exp $ */ +/* $OpenBSD: help.c,v 1.7 2016/01/10 14:10:38 mestre Exp $ */ /* $NetBSD: help.c,v 1.2 1995/03/21 12:14:38 cgd Exp $ */ /*- @@ -60,7 +60,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 0121c01fe72..9c356f073c6 100644 --- a/games/boggle/boggle/mach.c +++ b/games/boggle/boggle/mach.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mach.c,v 1.20 2016/01/10 13:35:09 mestre Exp $ */ +/* $OpenBSD: mach.c,v 1.21 2016/01/10 14:10:38 mestre Exp $ */ /* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */ /*- @@ -274,7 +274,7 @@ get_line(char *q) } *p = '\0'; if (ch == EOF) - return((char *) NULL); + return(NULL); return(q); } diff --git a/games/bs/bs.c b/games/bs/bs.c index 8f4e3b9186f..94786b5dda3 100644 --- a/games/bs/bs.c +++ b/games/bs/bs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs.c,v 1.37 2016/01/08 20:19:06 mestre Exp $ */ +/* $OpenBSD: bs.c,v 1.38 2016/01/10 14:10:39 mestre Exp $ */ /* * Copyright (c) 1986, Bruce Holloway * All rights reserved. @@ -512,7 +512,7 @@ regetchar: prompt(1, "Random-placing your %s", ss->name); randomplace(PLAYER, ss); placeship(PLAYER, ss, TRUE); - error((char *)NULL); + error(NULL); ss->placed = TRUE; break; case 'R': @@ -524,7 +524,7 @@ regetchar: placeship(PLAYER, ss, TRUE); ss->placed = TRUE; } - error((char *)NULL); + error(NULL); break; case 'k': case 'j': case 'h': case 'l': @@ -544,7 +544,7 @@ regetchar: if (checkplace(PLAYER, ss, TRUE)) { placeship(PLAYER, ss, TRUE); - error((char *)NULL); + error(NULL); ss->placed = TRUE; } break; diff --git a/games/hunt/hunt/hunt.c b/games/hunt/hunt/hunt.c index 144d4e49967..84c3b6265de 100644 --- a/games/hunt/hunt/hunt.c +++ b/games/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hunt.c,v 1.19 2016/01/07 21:37:53 mestre Exp $ */ +/* $OpenBSD: hunt.c,v 1.20 2016/01/10 14:10:39 mestre Exp $ */ /* $NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -248,7 +248,7 @@ main(int ac, char **av) if ((enter_status = quit(enter_status)) == Q_QUIT) break; } - leave(0, (char *) NULL); + leave(0, NULL); return 0; } @@ -425,7 +425,7 @@ bad_ver(void) static void sigterm(int dummy) { - leave(0, (char *) NULL); + leave(0, NULL); } /* @@ -469,7 +469,7 @@ intr(int dummy) (void) write(Socket, "q", 1); (void) close(Socket); } - leave(0, (char *) NULL); + leave(0, NULL); } else if (ch == 'n') { (void) signal(SIGINT, intr); |