summaryrefslogtreecommitdiff
path: root/lib/error.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-11-15 17:35:34 +0000
committerJim Meyering <jim@meyering.net>1998-11-15 17:35:34 +0000
commit82a4c5fa91b9e876712b8944161075757da1dbb7 (patch)
treedb2cc47fbc5011e46c3a5f7a9f3d70850d4e3716 /lib/error.c
parentce9b1d88d92e9b1c321fee165b135c277bd2dabd (diff)
downloadgnulib-82a4c5fa91b9e876712b8944161075757da1dbb7.tar.gz
(error): Don't use strerror_r's return value.
Diffstat (limited to 'lib/error.c')
-rw-r--r--lib/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/error.c b/lib/error.c
index 83998bb08b..4eff5d0f9d 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