[PATCH 01/11] Remove duplicate stdio initializations

Matthew Joyce <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
From: Matt Joyce <[email protected]>

Removed duplicate stdio initializations from __sinit(). These
are already initialized in the _REENT_INIT macro in sys/reent.h.
This simplification enables the reduction of _GLOBAL_REENT
dependency in a follow-on patch.
---
 newlib/libc/stdio/findfp.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 1370b63b8..ab3c6a55d 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -259,10 +259,6 @@ __sinit (struct _reent *s)
   s->_stdin = __sfp(s);
   s->_stdout = __sfp(s);
   s->_stderr = __sfp(s);
-# else /* _REENT_GLOBAL_STDIO_STREAMS */
-  s->_stdin = &__sf[0];
-  s->_stdout = &__sf[1];
-  s->_stderr = &__sf[2];
 # endif /* _REENT_GLOBAL_STDIO_STREAMS */
 #endif
 
-- 
2.31.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.