aboutsummaryrefslogtreecommitdiffstats
path: root/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'report.c')
-rw-r--r--report.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/report.c b/report.c
index 1e653646..f5c2110d 100644
--- a/report.c
+++ b/report.c
@@ -224,8 +224,15 @@ error (status, errnum, message, va_alist)
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
#endif
- if (errnum)
- fprintf (stderr, ": %s", strerror (errnum));
+ if (errnum) {
+ char *tmps = strerror(errnum);
+ if (tmps) {
+ fprintf (stderr, ": %s", tmps);
+ }
+ else {
+ fprintf (stderr, ": Error %d", errnum);
+ }
+ }
putc ('\n', stderr);
fflush (stderr);
}