aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/viprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/viprintf.c')
-rw-r--r--newlib/libc/stdio/viprintf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/viprintf.c b/newlib/libc/stdio/viprintf.c
index 3717f3a..fec92fa 100644
--- a/newlib/libc/stdio/viprintf.c
+++ b/newlib/libc/stdio/viprintf.c
@@ -109,8 +109,10 @@ _DEFUN(viprintf, (fmt, ap),
_CONST char *fmt _AND
va_list ap)
{
- _REENT_SMALL_CHECK_INIT (_REENT);
- return _vfiprintf_r (_REENT, _stdout_r (_REENT), fmt, ap);
+ struct _reent *reent = _REENT;
+
+ _REENT_SMALL_CHECK_INIT (reent);
+ return _vfiprintf_r (reent, _stdout_r (reent), fmt, ap);
}
#endif /* !_REENT_ONLY */