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/stdio/getchar.c')
-rw-r--r--newlib/libc/stdio/getchar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/getchar.c b/newlib/libc/stdio/getchar.c
index da2f5dfaf..7f3ceac62 100644
--- a/newlib/libc/stdio/getchar.c
+++ b/newlib/libc/stdio/getchar.c
@@ -91,9 +91,11 @@ _DEFUN(_getchar_r, (reent),
int
_DEFUN_VOID(getchar)
{
+ struct _reent *reent = _REENT;
+
/* CHECK_INIT is called (eventually) by __srefill_r. */
- _REENT_SMALL_CHECK_INIT (_REENT);
- return _getc_r (_REENT, _stdin_r (_REENT));
+ _REENT_SMALL_CHECK_INIT (reent);
+ return _getc_r (reent, _stdin_r (reent));
}
#endif