summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_exit.c')
-rw-r--r--lib/libpthread/thread/thr_exit.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libpthread/thread/thr_exit.c b/lib/libpthread/thread/thr_exit.c
index 22f187b..6dbef07 100644
--- a/lib/libpthread/thread/thr_exit.c
+++ b/lib/libpthread/thread/thr_exit.c
@@ -47,16 +47,12 @@ __weak_reference(_pthread_exit, pthread_exit);
void
_thr_exit(char *fname, int lineno, char *msg)
{
- char s[256];
- /* Prepare an error message string: */
- snprintf(s, sizeof(s),
+ /* Write an error message to the standard error file descriptor: */
+ _thread_printf(2,
"Fatal error '%s' at line %d in file %s (errno = %d)\n",
msg, lineno, fname, errno);
- /* Write the string to the standard error file descriptor: */
- __sys_write(2, s, strlen(s));
-
abort();
}
OpenPOWER on IntegriCloud