Remove duplicate sglue initializations

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.
This commit is contained in:
Matt Joyce 2022-04-01 11:32:00 +02:00 committed by Sebastian Huber
parent 5a066d46c9
commit 92896d4daa
1 changed files with 0 additions and 3 deletions

View File

@ -246,15 +246,12 @@ __sinit (struct _reent *s)
/* make sure we clean up on exit */ /* make sure we clean up on exit */
s->__cleanup = cleanup_stdio; /* conservative */ s->__cleanup = cleanup_stdio; /* conservative */
s->__sglue._next = NULL;
#ifndef _REENT_SMALL #ifndef _REENT_SMALL
# ifndef _REENT_GLOBAL_STDIO_STREAMS # ifndef _REENT_GLOBAL_STDIO_STREAMS
s->__sglue._niobs = 3; s->__sglue._niobs = 3;
s->__sglue._iobs = &s->__sf[0]; s->__sglue._iobs = &s->__sf[0];
# endif /* _REENT_GLOBAL_STDIO_STREAMS */ # endif /* _REENT_GLOBAL_STDIO_STREAMS */
#else #else
s->__sglue._niobs = 0;
s->__sglue._iobs = NULL;
# ifndef _REENT_GLOBAL_STDIO_STREAMS # ifndef _REENT_GLOBAL_STDIO_STREAMS
s->_stdin = __sfp(s); s->_stdin = __sfp(s);
s->_stdout = __sfp(s); s->_stdout = __sfp(s);