1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

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@
This commit is contained in:
mestre 2016-01-10 14:10:38 +00:00
parent 033e8ff0fb
commit 7dd160a593
4 changed files with 12 additions and 12 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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);