Don't cast the return value of calloc().
This commit is contained in:
parent
b8c43a1f9c
commit
3b67879708
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_main.c,v 1.13 2009/03/02 06:44:22 dholland Exp $ */
|
||||
/* $NetBSD: dr_main.c,v 1.14 2009/03/14 19:36:42 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_main.c 8.2 (Berkeley) 4/16/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_main.c,v 1.13 2009/03/02 06:44:22 dholland Exp $");
|
||||
__RCSID("$NetBSD: dr_main.c,v 1.14 2009/03/14 19:36:42 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -69,7 +69,7 @@ dr_main(void)
|
||||
nat[n] = 0;
|
||||
foreachship(sp) {
|
||||
if (sp->file == NULL &&
|
||||
(sp->file = (struct File *)calloc(1, sizeof (struct File))) == NULL) {
|
||||
(sp->file = calloc(1, sizeof (struct File))) == NULL) {
|
||||
fprintf(stderr, "DRIVER: Out of memory.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pl_main.c,v 1.22 2009/03/14 19:35:13 dholland Exp $ */
|
||||
/* $NetBSD: pl_main.c,v 1.23 2009/03/14 19:36:42 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pl_main.c,v 1.22 2009/03/14 19:35:13 dholland Exp $");
|
||||
__RCSID("$NetBSD: pl_main.c,v 1.23 2009/03/14 19:36:42 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -99,7 +99,7 @@ reprint:
|
||||
nat[n] = 0;
|
||||
foreachship(sp) {
|
||||
if (sp->file == NULL &&
|
||||
(sp->file = (struct File *)calloc(1, sizeof (struct File))) == NULL) {
|
||||
(sp->file = calloc(1, sizeof (struct File))) == NULL) {
|
||||
err(1, "calloc");
|
||||
}
|
||||
sp->file->index = sp - SHIP(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user