summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2002-08-03 09:10:31 +0000
committerache <ache@FreeBSD.org>2002-08-03 09:10:31 +0000
commitb6a6d004ff40fbdb0d42759bf770214592ca16ea (patch)
treeb5772bb7f7085b70e124f5ed67f523eb37017892
parent3b1f16ca2dd1d2848876843d8585e2f14f910809 (diff)
downloadFreeBSD-src-b6a6d004ff40fbdb0d42759bf770214592ca16ea.zip
FreeBSD-src-b6a6d004ff40fbdb0d42759bf770214592ca16ea.tar.gz
Return EINVAL for NULL or too long encoding, not EFAULT
-rw-r--r--lib/libc/locale/setrunelocale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index 774226c..e9cee2e 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -62,7 +62,7 @@ setrunelocale(encoding)
_RuneLocale *rl;
if (!encoding || strlen(encoding) > ENCODING_LEN)
- return(EFAULT);
+ return (EINVAL);
/*
* The "C" and "POSIX" locale are always here.
OpenPOWER on IntegriCloud