diff options
author | Matt Joyce <matthew.joyce@embedded-brains.de> | 2022-01-28 12:58:36 +0300 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-13 07:55:46 +0300 |
commit | 627a5cb4133ece2a80dbca27c403d4ceb3139130 (patch) | |
tree | 039bdd320b53c183829c7c32712e09da41ccf0ee /newlib/libc/stdio | |
parent | f3b8138239d3ba34c4ecaa4305b0fbd7eb4e28a5 (diff) |
Add _REENT_STDIN(ptr)
Add a _REENT_STDIN() macro to encapsulate access to the _stdin
member of struct reent. This will help to replace the struct
member with a thread-local storage object in a follow up patch.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/findfp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index c7a4a941e..d2292d3e0 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -218,8 +218,8 @@ found: static void cleanup_stdio (struct _reent *ptr) { - if (ptr->_stdin != &__sf[0]) - CLEANUP_FILE (ptr, ptr->_stdin); + if (_REENT_STDIN(ptr) != &__sf[0]) + CLEANUP_FILE (ptr, _REENT_STDIN(ptr)); if (ptr->_stdout != &__sf[1]) CLEANUP_FILE (ptr, ptr->_stdout); if (ptr->_stderr != &__sf[2]) |