Index: fread.c =================================================================== RCS file: /cvs/src/src/newlib/libc/stdio/fread.c,v retrieving revision 1.7 diff -u -p -r1.7 fread.c --- fread.c 24 Sep 2004 09:13:11 -0000 1.7 +++ fread.c 26 Oct 2004 13:00:39 -0000 @@ -167,19 +167,15 @@ _DEFUN(fread, (buf, size, count, fp), fp->_bf._base = old_base; fp->_bf._size = old_size; fp->_p = old_p; - if (rc) - { - /* no more input: return partial result */ #ifdef __SCLE - if (fp->_flags & __SCLE) - { - _funlockfile (fp); - return crlf (fp, buf, total-resid, 1) / size; - } -#endif + if (fp->_flags & __SCLE) + { _funlockfile (fp); - return (total - resid) / size; + return crlf (fp, buf, total-resid, 1) / size; } +#endif + _funlockfile (fp); + return (total - resid) / size; } } else