projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Change strerror so that it never returns an empty string.
[pspp]
/
lib
/
strerror.c
diff --git
a/lib/strerror.c
b/lib/strerror.c
index 9b9ffd104d57353c534b639ba8f6dbb2fa941b06..9fe437db78df8a661bb2f6709b8d943b102832cc 100644
(file)
--- a/
lib/strerror.c
+++ b/
lib/strerror.c
@@
-35,7
+35,7
@@
rpl_strerror (int n)
{
char *result = strerror (n);
- if (
! result
)
+ if (
result == NULL || result[0] == '\0'
)
{
static char const fmt[] = "Unknown error (%d)";
static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];