Index: newlib/libc/stdio/findfp.c |
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c |
index 4a465eb4f4cf4d37c3b606e0fd08c0cf5225eeed..42211afa42aa2029a04cbad0e5e9362eb438dde4 100644 |
--- a/newlib/libc/stdio/findfp.c |
+++ b/newlib/libc/stdio/findfp.c |
@@ -115,7 +115,6 @@ _DEFUN(__sfp, (d), |
FILE *fp; |
int n; |
struct _glue *g; |
- int found_fp = 0; |
CHECK_INIT(_GLOBAL_REENT, NULL); |
@@ -124,13 +123,8 @@ _DEFUN(__sfp, (d), |
for (g = &_GLOBAL_REENT->__sglue;; g = g->_next) |
{ |
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) |
- { |
- _flockfile(fp); |
- found_fp = (fp->_flags == 0); |
- _funlockfile(fp); |
- if (found_fp) |
- goto found; |
- } |
+ if (fp->_flags == 0) |
+ goto found; |
if (g->_next == NULL && |
(g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL) |
break; |