diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-01-31 00:39:07 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-01-31 00:39:07 +0000 |
commit | c730e0e7caa61c53e211c2eefa2afe1e31510714 (patch) | |
tree | 66121fe2bec5fa8ce83d1bfb0fe286cdb4d0ce45 /newlib | |
parent | 2892ec68008eb6d7578e314d3543c9e2905c4cfb (diff) | |
download | newlib-c730e0e7caa61c53e211c2eefa2afe1e31510714.zip newlib-c730e0e7caa61c53e211c2eefa2afe1e31510714.tar.gz newlib-c730e0e7caa61c53e211c2eefa2afe1e31510714.tar.bz2 |
2004-01-30 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fwalk.c (_fwalk.c): Don't traverse the
file chain on the passed in reentrancy struct if it
is _GLOBAL_REENT.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/stdio/fwalk.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index e84ad88..66faead 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2004-01-30 Jeff Johnston <jjohnstn@redhat.com> + + * libc/stdio/fwalk.c (_fwalk.c): Don't traverse the + file chain on the passed in reentrancy struct if it + is _GLOBAL_REENT. + 2004-01-30 Artem B. Bityuckiy <abitytsky@softminecorp.com> Jeff Johnston <jjohnstn@redhat.com> diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c index 4d37499..b147da3 100644 --- a/newlib/libc/stdio/fwalk.c +++ b/newlib/libc/stdio/fwalk.c @@ -36,10 +36,13 @@ _fwalk (ptr, function) register struct _glue *g; /* Must traverse given list for std streams. */ - for (g = &ptr->__sglue; g != NULL; g = g->_next) - for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) - if (fp->_flags != 0) - ret |= (*function) (fp); + if (ptr != _GLOBAL_REENT) + { + for (g = &ptr->__sglue; g != NULL; g = g->_next) + for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) + if (fp->_flags != 0) + ret |= (*function) (fp); + } /* Must traverse global list for all other streams. */ for (g = &_GLOBAL_REENT->__sglue; g != NULL; g = g->_next) |