diff options
author | Matt Joyce <matthew.joyce@embedded-brains.de> | 2022-02-01 12:37:46 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-13 06:55:46 +0200 |
commit | 3266a463274789de3d805667a851c08bf5b36c18 (patch) | |
tree | 0311c6eb31ded5ea59159b3e64c9055080a7338d /newlib/libc/stdio | |
parent | 627a5cb4133ece2a80dbca27c403d4ceb3139130 (diff) | |
download | newlib-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.c | 4 |
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); } |