diff options
Diffstat (limited to 'newlib/libc/stdio/scanf.c')
-rw-r--r-- | newlib/libc/stdio/scanf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c index 68fd8fb65..19c85be4f 100644 --- a/newlib/libc/stdio/scanf.c +++ b/newlib/libc/stdio/scanf.c @@ -38,14 +38,15 @@ scanf(fmt, va_alist) { int ret; va_list ap; + struct _reent *reent = _REENT; - _REENT_SMALL_CHECK_INIT (_REENT); + _REENT_SMALL_CHECK_INIT (reent); #ifdef _HAVE_STDC va_start (ap, fmt); #else va_start (ap); #endif - ret = _vfscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); + ret = _vfscanf_r (reent, _stdin_r (reent), fmt, ap); va_end (ap); return ret; } |