summaryrefslogtreecommitdiff
path: root/wcsmbs/mbrtowc.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/mbrtowc.c')
-rw-r--r--wcsmbs/mbrtowc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c
index 056f7be517..efd382b4c6 100644
--- a/wcsmbs/mbrtowc.c
+++ b/wcsmbs/mbrtowc.c
@@ -62,7 +62,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
if ((byte & 0xc0) == 0x80 || (byte & 0xfe) == 0xfe)
{
/* Oh, oh. An encoding error. */
- errno = EILSEQ;
+ __set_errno (EILSEQ);
return (size_t) -1;
}
@@ -109,7 +109,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
if ((byte & 0xc0) != 0x80)
{
/* Oh, oh. An encoding error. */
- errno = EILSEQ;
+ __set_errno (EILSEQ);
return (size_t) -1;
}