projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11135e1
)
(error): Don't use strerror_r's return value.
author
Jim Meyering
<jim@meyering.net>
Sun, 15 Nov 1998 17:35:34 +0000
(17:35 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 15 Nov 1998 17:35:34 +0000
(17:35 +0000)
lib/error.c
patch
|
blob
|
history
diff --git
a/lib/error.c
b/lib/error.c
index 83998bb08b6a9382a29e4843e9df8d5a4c1a8adc..4eff5d0f9d801bf037454948b4333cf5e73cb6e1 100644
(file)
--- 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