diff options
Diffstat (limited to 'support/xasprintf.c')
-rw-r--r-- | support/xasprintf.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 <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; } |