Module Name: src
Committed By: christos
Date: Mon Jun 7 11:45:35 UTC 2021
Modified Files:
src/tests/lib/libc/regex: t_exhaust.c
Log Message:
Add more information for the malloc failure.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/regex/t_exhaust.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/regex/t_exhaust.c
diff -u src/tests/lib/libc/regex/t_exhaust.c:1.10 src/tests/lib/libc/regex/t_exhaust.c:1.11
--- src/tests/lib/libc/regex/t_exhaust.c:1.10 Tue Jul 9 09:59:25 2019
+++ src/tests/lib/libc/regex/t_exhaust.c Mon Jun 7 07:45:35 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $ */
+/* $NetBSD: t_exhaust.c,v 1.11 2021/06/07 11:45:35 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_exhaust.c,v 1.10 2019/07/09 13:59:25 gson Exp $");
+__RCSID("$NetBSD: t_exhaust.c,v 1.11 2021/06/07 11:45:35 christos Exp $");
#include <sys/resource.h>
#include <atf-c.h>
@@ -69,7 +69,7 @@ concat(const char *d, const char *s)
size_t slen = strlen(s);
char *p = malloc(dlen + slen + 1);
- ATF_REQUIRE(p != NULL);
+ ATF_REQUIRE_MSG(p != NULL, "slen=%zu, dlen=%zu", slen, dlen);
strcpy(p, d);
strcpy(p + dlen, s);
return p;