diff options
Diffstat (limited to 'newlib/libc/stdio/fcloseall.c')
-rw-r--r-- | newlib/libc/stdio/fcloseall.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/newlib/libc/stdio/fcloseall.c b/newlib/libc/stdio/fcloseall.c index d51c6fe34..e5a3af277 100644 --- a/newlib/libc/stdio/fcloseall.c +++ b/newlib/libc/stdio/fcloseall.c @@ -66,15 +66,7 @@ int _fcloseall_r (ptr) struct _reent *ptr; { - register FILE *fp; - register int n, ret = 0; - register struct _glue *g; - - for (g = &ptr->__sglue; g != NULL; g = g->_next) - for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) - if (fp->_flags != 0) - ret |= fclose (fp); - return ret; + return _fwalk (ptr, fclose); } #ifndef _REENT_ONLY |