Skip to content

Commit 2d56794

Browse files
committed
Add a message when malloc fails
from nightquick in PR misc/58706
1 parent e3dd051 commit 2d56794

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

games/worm/worm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: worm.c,v 1.31 2015/08/17 17:17:01 dholland Exp $ */
1+
/* $NetBSD: worm.c,v 1.32 2024/12/11 03:47:27 maya Exp $ */
22

33
/*
44
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
3939
#if 0
4040
static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93";
4141
#else
42-
__RCSID("$NetBSD: worm.c,v 1.31 2015/08/17 17:17:01 dholland Exp $");
42+
__RCSID("$NetBSD: worm.c,v 1.32 2024/12/11 03:47:27 maya Exp $");
4343
#endif
4444
#endif /* not lint */
4545

@@ -100,7 +100,7 @@ newlink(void)
100100

101101
b = malloc(sizeof(*b));
102102
if (b == NULL) {
103-
err(EXIT_FAILURE, NULL);
103+
err(EXIT_FAILURE, "malloc failed");
104104
}
105105
return b;
106106
}

0 commit comments

Comments
 (0)