diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-07-31 20:08:31 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-07-31 20:08:31 +0000 |
commit | 17e6bc56e09e27f5065d428383edd57321c0448e (patch) | |
tree | 78308a2edf9ff892e53a359bebcc73bb095014cf /games/atc/list.c | |
parent | 12b50e1b44b008878db3bb88d3e20daf5a35aa33 (diff) |
- make atc check for calloc() failure; correctly check for redefinition of
"width" in game definition files (jsm28@cam.ac.uk)
- clean up man page some (based on work of dholland@eecs.harvard.edu)
Diffstat (limited to 'games/atc/list.c')
-rw-r--r-- | games/atc/list.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/games/atc/list.c b/games/atc/list.c index 2de6251968a..a2fc6df2a14 100644 --- a/games/atc/list.c +++ b/games/atc/list.c @@ -1,4 +1,4 @@ -/* $OpenBSD: list.c,v 1.2 1998/09/21 07:36:06 pjanzen Exp $ */ +/* $OpenBSD: list.c,v 1.3 1999/07/31 20:08:30 pjanzen Exp $ */ /* $NetBSD: list.c,v 1.3 1995/03/21 15:04:18 cgd Exp $ */ /*- @@ -50,7 +50,7 @@ #if 0 static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: list.c,v 1.2 1998/09/21 07:36:06 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: list.c,v 1.3 1999/07/31 20:08:30 pjanzen Exp $"; #endif #endif /* not lint */ @@ -59,7 +59,11 @@ static char rcsid[] = "$OpenBSD: list.c,v 1.2 1998/09/21 07:36:06 pjanzen Exp $" PLANE * newplane() { - return ((PLANE *) calloc(1, sizeof (PLANE))); + PLANE *p; + + if ((p = (PLANE *) calloc(1, sizeof (PLANE))) == NULL) + loser(NULL, "Out of memory"); + return (p); } void |