mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 15:20:09 +08:00
Update to FreeBSD head 2016-12-10
Git mirror commit 80c55f08a05ab3b26a73b226ccb56adc3122a55c.
This commit is contained in:
@@ -143,8 +143,11 @@ fgetln(FILE *fp, size_t *lenp)
|
||||
(void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
|
||||
len - off);
|
||||
off = len;
|
||||
if (__srefill(fp))
|
||||
break; /* EOF or error: return partial line */
|
||||
if (__srefill(fp)) {
|
||||
if (__sfeof(fp))
|
||||
break;
|
||||
goto error;
|
||||
}
|
||||
if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) == NULL)
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user