Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fwalk.c')
-rw-r--r--newlib/libc/stdio/fwalk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c
index cceaa96c2..975e4b001 100644
--- a/newlib/libc/stdio/fwalk.c
+++ b/newlib/libc/stdio/fwalk.c
@@ -73,8 +73,11 @@ _DEFUN(_fwalk_reent, (ptr, reent_function),
*/
for (g = &ptr->__sglue; g != NULL; g = g->_next)
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
- if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
- ret |= (*reent_function) (ptr, fp);
+ if (fp->_flags != 0)
+ {
+ if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
+ ret |= (*reent_function) (ptr, fp);
+ }
return ret;
}