[PATCH v2 02/11] Remove duplicate sglue initializations

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

Removed duplicate sglue 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 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index ab3c6a55d..8327b1992 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -246,15 +246,12 @@ __sinit (struct _reent *s)
   /* make sure we clean up on exit */
   s->__cleanup = cleanup_stdio;	/* conservative */
 
-  s->__sglue._next = NULL;
 #ifndef _REENT_SMALL
 # ifndef _REENT_GLOBAL_STDIO_STREAMS
   s->__sglue._niobs = 3;
   s->__sglue._iobs = &s->__sf[0];
 # endif /* _REENT_GLOBAL_STDIO_STREAMS */
 #else
-  s->__sglue._niobs = 0;
-  s->__sglue._iobs = NULL;
 # ifndef _REENT_GLOBAL_STDIO_STREAMS
   s->_stdin = __sfp(s);
   s->_stdout = __sfp(s);
-- 
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.