Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/mbrlen.c')
-rw-r--r--newlib/libc/stdlib/mbrlen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/mbrlen.c b/newlib/libc/stdlib/mbrlen.c
index ac9aa324f..4319875a1 100644
--- a/newlib/libc/stdlib/mbrlen.c
+++ b/newlib/libc/stdlib/mbrlen.c
@@ -11,8 +11,10 @@ mbrlen(const char *s, size_t n, mbstate_t *ps)
#ifdef _MB_CAPABLE
if (ps == NULL)
{
- _REENT_CHECK_MISC(_REENT);
- ps = &(_REENT_MBRLEN_STATE(_REENT));
+ struct _reent *reent = _REENT;
+
+ _REENT_CHECK_MISC(reent);
+ ps = &(_REENT_MBRLEN_STATE(reent));
}
#endif