mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
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).
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <support/check.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user