From: Jim Meyering Date: Sun, 15 Nov 1998 17:35:34 +0000 (+0000) Subject: (error): Don't use strerror_r's return value. X-Git-Tag: FILEUTILS-4_1-b1~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e77961586a61210868551b526268c8a44f94e1f8;p=platform%2Fupstream%2Fcoreutils.git (error): Don't use strerror_r's return value. --- diff --git a/lib/error.c b/lib/error.c index 83998bb08..4eff5d0f9 100644 --- a/lib/error.c +++ b/lib/error.c @@ -152,7 +152,10 @@ error (status, errnum, message, va_alist) { #if defined HAVE_STRERROR_R || defined _LIBC char errbuf[1024]; - fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf)); + /* Don't use __strerror_r's return value because on some systems + (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */ + __strerror_r (errnum, errbuf, sizeof errbuf); + fprintf (stderr, ": %s", errbuf); #else fprintf (stderr, ": %s", strerror (errnum)); #endif