2004-10-26 Jason Tishler <jason@tishler.net>
* libc/stdio/fread.c (fread): Fix return value for unbuffered fread.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user