summaryrefslogtreecommitdiff
path: root/libc/string/strerror.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-18 23:38:13 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-18 23:38:13 +0000
commit9b7d191055ade5069c6325fa857e007b4c658b14 (patch)
tree3546e12e3453e15508dbdfbec0a940e3e3de0647 /libc/string/strerror.c
parenta6a89eb4477289063cb9ef1cc414b9e748f877f9 (diff)
More updates. Implement strsignal. Add pwd_grp tests
Diffstat (limited to 'libc/string/strerror.c')
-rw-r--r--libc/string/strerror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/string/strerror.c b/libc/string/strerror.c
index 6eeac104e..91565965f 100644
--- a/libc/string/strerror.c
+++ b/libc/string/strerror.c
@@ -32,14 +32,14 @@ char *strerror(int err)
if (sys_nerr) {
if (err < 0 || err >= sys_nerr)
goto unknown;
- return sys_errlist[err];
+ strcpy(retbuf, sys_errlist[err]);
+ return retbuf;
}
if (err <= 0)
goto unknown;
unknown:
- printf("sys_nerr=%d\n", sys_nerr);
strcpy(retbuf, "Unknown Error: errno=");
strcat(retbuf, (char *) itoa(err));
return retbuf;