Module Name:    src
Committed By:   maya
Date:           Wed Dec 11 03:47:27 UTC 2024

Modified Files:
        src/games/worm: worm.c

Log Message:
Add a message when malloc fails

from nightquick in PR misc/58706


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/games/worm/worm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/worm/worm.c
diff -u src/games/worm/worm.c:1.31 src/games/worm/worm.c:1.32
--- src/games/worm/worm.c:1.31	Mon Aug 17 17:17:01 2015
+++ src/games/worm/worm.c	Wed Dec 11 03:47:27 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: worm.c,v 1.31 2015/08/17 17:17:01 dholland Exp $	*/
+/*	$NetBSD: worm.c,v 1.32 2024/12/11 03:47:27 maya Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)worm.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: worm.c,v 1.31 2015/08/17 17:17:01 dholland Exp $");
+__RCSID("$NetBSD: worm.c,v 1.32 2024/12/11 03:47:27 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -100,7 +100,7 @@ newlink(void)
 
 	b = malloc(sizeof(*b));
 	if (b == NULL) {
-		err(EXIT_FAILURE, NULL);
+		err(EXIT_FAILURE, "malloc failed");
 	}
 	return b;
 }

Reply via email to