From e55a4c69ad6dfa55e6a3262864f6dce13f495ba3 Mon Sep 17 00:00:00 2001 From: jsm Date: Sun, 9 Jan 2000 17:17:19 +0000 Subject: Use err(1, NULL) and warn(NULL) for `out of memory' error messages. --- adventure/io.c | 10 +++++----- adventure/vocab.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'adventure') diff --git a/adventure/io.c b/adventure/io.c index bbe54d92..e3c80e89 100644 --- a/adventure/io.c +++ b/adventure/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.11 1999/02/10 00:11:28 hubertf Exp $ */ +/* $NetBSD: io.c,v 1.12 2000/01/09 17:17:19 jsm Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: io.c,v 1.11 1999/02/10 00:11:28 hubertf Exp $"); +__RCSID("$NetBSD: io.c,v 1.12 2000/01/09 17:17:19 jsm Exp $"); #endif #endif /* not lint */ @@ -361,7 +361,7 @@ rtrav() 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; @@ -384,7 +384,7 @@ rtrav() 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 */ @@ -559,7 +559,7 @@ pspeak(m, skip) /* read, decrypt an print a ptext message */ msg = &ptext[m]; if ((tbuf = (char *) malloc(msg->txtlen + 1)) == NULL) - errx(1, "Out of memory!"); + err(1, NULL); memcpy(tbuf, msg->seekadr, msg->txtlen + 1); /* Room to null */ s = tbuf; diff --git a/adventure/vocab.c b/adventure/vocab.c index 5acc8b96..f1e4d503 100644 --- a/adventure/vocab.c +++ b/adventure/vocab.c @@ -1,4 +1,4 @@ -/* $NetBSD: vocab.c,v 1.9 1998/09/14 09:29:09 hubertf Exp $ */ +/* $NetBSD: vocab.c,v 1.10 2000/01/09 17:17:19 jsm Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: vocab.c,v 1.9 1998/09/14 09:29:09 hubertf Exp $"); +__RCSID("$NetBSD: vocab.c,v 1.10 2000/01/09 17:17:19 jsm Exp $"); #endif #endif /* not lint */ @@ -165,7 +165,7 @@ vocab(word, type, value) /* look up or store a word */ h->val = value; h->atab = malloc(length(word)); if (h->atab == NULL) - errx(1, "Out of memory!"); + err(1, NULL); for (s = word, t = h->atab; *s;) *t++ = *s++ ^ '='; *t = 0 ^ '='; -- cgit v1.2.3-56-ge451