From 44cfc6031b411c3e66d78fb804c759b27791bb34 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Mon, 25 Feb 2008 13:17:06 +0000 Subject: [PATCH] misc/threads.c: Fix error description printing in vlc_pthread_fatal(). --- src/misc/threads.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/misc/threads.c b/src/misc/threads.c index 9c5d05ea06..81d82a9be6 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -95,17 +95,16 @@ static inline unsigned long vlc_threadid (void) void vlc_pthread_fatal (const char *action, int error, const char *file, unsigned line) { - char buf[1000]; const char *msg; fprintf (stderr, "LibVLC fatal error %s in thread %lu at %s:%u: %d\n", action, vlc_threadid (), file, line, error); fflush (stderr); - /* Sometimes strerror_r() crashes too, so make sure we print an error + /* Sometimes strerror() crashes too, so make sure we print an error * message before we invoke it */ - msg = strerror_r (error, buf, sizeof (buf)); - fprintf (stderr, " %s\n", msg ? msg : "(null)"); + msg = strerror (error); + fprintf (stderr, "Error description was: \"%s\"\n", msg ? msg : "(null)"); fflush (stderr); abort (); }