diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-02-17 20:15:01 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-02-17 20:15:01 +0000 |
commit | 541cb262e526b7415bb94badb53deeb08c633a4d (patch) | |
tree | f6a17c348e5c639103f64dd9f3ec509de629fbc0 /games/adventure/io.c | |
parent | 5dc1778f37a1d6d773ec2209a474d8487b973125 (diff) |
Use err() rather than errx() immediately after alloc failure.
Diffstat (limited to 'games/adventure/io.c')
-rw-r--r-- | games/adventure/io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/games/adventure/io.c b/games/adventure/io.c index 849e1f061e4..c397d682506 100644 --- a/games/adventure/io.c +++ b/games/adventure/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.7 1998/11/29 19:45:10 pjanzen Exp $ */ +/* $OpenBSD: io.c,v 1.8 2001/02/17 20:14:57 pjanzen Exp $ */ /* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */ /*- @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.7 1998/11/29 19:45:10 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.8 2001/02/17 20:14:57 pjanzen Exp $"; #endif #endif /* not lint */ @@ -389,7 +389,7 @@ rtrav() /* read travel table */ if (locc != oldloc) { /* getting a new entry */ t = travel[locc] = (struct travlist *) malloc(sizeof (struct travlist)); if (t == NULL) - errx(1, "Out of memory!"); + err(1, NULL); /* printf("New travel list for %d\n", locc); */ entries = 0; oldloc = locc; @@ -412,7 +412,7 @@ rtrav() /* read travel table */ if (entries++) { t = t->next = (struct travlist *) malloc(sizeof (struct travlist)); if (t == NULL) - errx(1, "Out of memory!"); + err(1, NULL); } t->tverb = rnum();/* get verb from the file */ t->tloc = n; /* table entry mod 1000 */ @@ -588,7 +588,7 @@ pspeak(m, skip) /* read, decrypt an print a ptext message */ msg = &ptext[m]; if ((tbuf = (char *) malloc(msg->txtlen + 1)) == 0) - errx(1, "Out of memory!"); + err(1, NULL); memcpy(tbuf, msg->seekadr, msg->txtlen + 1); /* Room to null */ s = tbuf; |