summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strerror_r.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2007-03-01 16:29:09 +0000
committerbluhm <bluhm@openbsd.org>2007-03-01 16:29:09 +0000
commitc6ac99c89de1fda1e9fc230a97f69773c2ae920f (patch)
treeb900019827453c907c3502a04608602e811acb62 /lib/libc/string/strerror_r.c
parentsort the `match' keywords; (diff)
downloadwireguard-openbsd-c6ac99c89de1fda1e9fc230a97f69773c2ae920f.tar.xz
wireguard-openbsd-c6ac99c89de1fda1e9fc230a97f69773c2ae920f.zip
If NLS is disabled, strerror does not print the correct error string.
No binary change with NLS enabled. ok otto millert espie
Diffstat (limited to 'lib/libc/string/strerror_r.c')
-rw-r--r--lib/libc/string/strerror_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/string/strerror_r.c b/lib/libc/string/strerror_r.c
index 85988a25619..aa63408ab86 100644
--- a/lib/libc/string/strerror_r.c
+++ b/lib/libc/string/strerror_r.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strerror_r.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: strerror_r.c,v 1.7 2007/03/01 16:29:09 bluhm Exp $ */
/* Public Domain <marc@snafu.org> */
#ifdef NLS
@@ -83,7 +83,7 @@ __num2string(int num, int sign, int setid, char *buf, size_t buflen,
len = strlcpy(buf, catgets(catd, setid, num, list[num]),
buflen);
#else
- len = strlcpy(buf, def, buflen);
+ len = strlcpy(buf, list[num], buflen);
#endif
if (len >= buflen)
ret = ERANGE;