diff options
author | Jim Meyering <jim@meyering.net> | 1998-11-15 17:35:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-11-15 17:35:34 +0000 |
commit | e77961586a61210868551b526268c8a44f94e1f8 (patch) | |
tree | 55156432ad35f7b52c069af408c6637c1975c09d /lib | |
parent | 11135e1307f898e561799858540b6d395bf2df24 (diff) | |
download | coreutils-e77961586a61210868551b526268c8a44f94e1f8.tar.xz |
(error): Don't use strerror_r's return value.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/error.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 |