aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio
diff options
context:
space:
mode:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-02-01 12:37:46 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-13 06:55:46 +0200
commit3266a463274789de3d805667a851c08bf5b36c18 (patch)
tree0311c6eb31ded5ea59159b3e64c9055080a7338d /newlib/libc/stdio
parent627a5cb4133ece2a80dbca27c403d4ceb3139130 (diff)
downloadnewlib-3266a463274789de3d805667a851c08bf5b36c18.zip
newlib-3266a463274789de3d805667a851c08bf5b36c18.tar.gz
newlib-3266a463274789de3d805667a851c08bf5b36c18.tar.bz2
Add _REENT_STDOUT(ptr)
Add a _REENT_STDOUT() macro to encapsulate access to the _stdout 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 d2292d3..04e3517 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -220,8 +220,8 @@ cleanup_stdio (struct _reent *ptr)
{
if (_REENT_STDIN(ptr) != &__sf[0])
CLEANUP_FILE (ptr, _REENT_STDIN(ptr));
- if (ptr->_stdout != &__sf[1])
- CLEANUP_FILE (ptr, ptr->_stdout);
+ if (_REENT_STDOUT(ptr) != &__sf[1])
+ CLEANUP_FILE (ptr, _REENT_STDOUT(ptr));
if (ptr->_stderr != &__sf[2])
CLEANUP_FILE (ptr, ptr->_stderr);
}