summaryrefslogtreecommitdiff
path: root/os/xprintf.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-11 17:37:44 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-11 21:23:46 -0700
commit09dbfcb0ad7b6c8bac94502f2801e82f2a2ef435 (patch)
tree266976a73252b8b73fc54bada9ddb1b3de14cbb4 /os/xprintf.c
parentdb30615bcb3b872475e7d40eeee8cdda5b723078 (diff)
os: Remove Error()
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os/xprintf.c')
-rw-r--r--os/xprintf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/xprintf.c b/os/xprintf.c
index 254b7374a..3b4bb4117 100644
--- a/os/xprintf.c
+++ b/os/xprintf.c
@@ -64,6 +64,8 @@
#include "os.h"
#include <stdarg.h>
#include <stdio.h>
+#include <errno.h>
+#include <string.h>
#ifdef asprintf
# undef asprintf
@@ -154,8 +156,7 @@ XNFvasprintf(char **ret, const char * _X_RESTRICT_KYWD format, va_list va)
{
int size = vasprintf(ret, format, va);
if ((size == -1) || (*ret == NULL)) {
- Error("XNFvasprintf");
- FatalError("XNFvasprintf failed");
+ FatalError("XNFvasprintf failed: %s", strerror(errno));
}
return size;
}