From 0b790d147a51704636abcdc31761ef98cb8a5833 Mon Sep 17 00:00:00 2001 From: Paul Janzen Date: Tue, 15 Sep 1998 05:29:49 +0000 Subject: use errx --- games/rain/rain.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'games/rain') diff --git a/games/rain/rain.c b/games/rain/rain.c index 9abe0ceb068..201e9bb6bb4 100644 --- a/games/rain/rain.c +++ b/games/rain/rain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rain.c,v 1.6 1998/08/19 07:41:06 pjanzen Exp $ */ +/* $OpenBSD: rain.c,v 1.7 1998/09/15 05:29:48 pjanzen Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rain.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: rain.c,v 1.6 1998/08/19 07:41:06 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: rain.c,v 1.7 1998/09/15 05:29:48 pjanzen Exp $"; #endif #endif /* not lint */ @@ -144,10 +144,8 @@ main(argc, argv) TI = tgetstr("ti", &tcp); UP = tgetstr("up", &tcp); if (!(LL = tgetstr("ll", &tcp))) { - if (!(LL = malloc((u_int)10))) { - fprintf(stderr, "%s: out of space.\n", *argv); - exit(1); - } + if (!(LL = malloc((u_int)10))) + errx(1, "out of memory"); (void)strcpy(LL, tgoto(CM, 0, 23)); } (void)signal(SIGHUP, onsig); -- cgit v1.2.3