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:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-01-28 12:58:36 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-13 07:55:46 +0300
commit627a5cb4133ece2a80dbca27c403d4ceb3139130 (patch)
tree039bdd320b53c183829c7c32712e09da41ccf0ee /newlib/libc/stdio
parentf3b8138239d3ba34c4ecaa4305b0fbd7eb4e28a5 (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.c4
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])