From 039c5a05cc905e3d48392e7ea9f85e339b7c068b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 31 Dec 2016 12:20:49 +0100 Subject: support: Use support_record_failure consistently This causes more test programs to link in the support_record_failure function, which triggers an early call to mmap from an ELF constructor, but this should not have side effects intefering with the functionality actually under test (unlike, say, a call to malloc). --- support/xasprintf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'support/xasprintf.c') diff --git a/support/xasprintf.c b/support/xasprintf.c index b9dc91ba4f..6aa1fe629e 100644 --- a/support/xasprintf.c +++ b/support/xasprintf.c @@ -21,6 +21,7 @@ #include #include #include +#include char * xasprintf (const char *format, ...) @@ -29,10 +30,7 @@ xasprintf (const char *format, ...) va_start (ap, format); char *result; if (vasprintf (&result, format, ap) < 0) - { - printf ("error: asprintf: %m\n"); - exit (1); - } + FAIL_EXIT1 ("asprintf: %m"); va_end (ap); return result; } -- cgit 1.4.1