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/string/strtok.c')
-rw-r--r--newlib/libc/string/strtok.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/string/strtok.c b/newlib/libc/string/strtok.c
index 7640fb73d..01bb09046 100644
--- a/newlib/libc/string/strtok.c
+++ b/newlib/libc/string/strtok.c
@@ -95,7 +95,9 @@ _DEFUN (strtok, (s, delim),
register char *s _AND
register const char *delim)
{
- _REENT_CHECK_MISC(_REENT);
- return __strtok_r (s, delim, &(_REENT_STRTOK_LAST(_REENT)), 1);
+ struct _reent *reent = _REENT;
+
+ _REENT_CHECK_MISC(reent);
+ return __strtok_r (s, delim, &(_REENT_STRTOK_LAST(reent)), 1);
}
#endif