diff options
author | Renato Botelho <renato@netgate.com> | 2016-08-30 09:16:57 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-08-30 09:16:57 -0300 |
commit | 39fd693a18f8ef73b1268f2321393d5ca6101e89 (patch) | |
tree | b1bae394d01f4c868d315c2d7a2f7f7f0539a57b /lib/libc/stdio/getdelim.c | |
parent | 29ebd1247162a77db08e5e2e00d033220ec807fe (diff) | |
parent | de43eec3e10416a7e9f3a7565f70e1ba2d265384 (diff) | |
download | FreeBSD-src-39fd693a18f8ef73b1268f2321393d5ca6101e89.zip FreeBSD-src-39fd693a18f8ef73b1268f2321393d5ca6101e89.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'lib/libc/stdio/getdelim.c')
-rw-r--r-- | lib/libc/stdio/getdelim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/getdelim.c b/lib/libc/stdio/getdelim.c index d7d5627..7e0b2e2 100644 --- a/lib/libc/stdio/getdelim.c +++ b/lib/libc/stdio/getdelim.c @@ -125,7 +125,7 @@ getdelim(char ** __restrict linep, size_t * __restrict linecapp, int delim, if (fp->_r <= 0 && __srefill(fp)) { /* If fp is at EOF already, we just need space for the NUL. */ - if (__sferror(fp) || expandtofit(linep, 1, linecapp)) + if (!__sfeof(fp) || expandtofit(linep, 1, linecapp)) goto error; FUNLOCKFILE(fp); (*linep)[0] = '\0'; @@ -137,7 +137,7 @@ getdelim(char ** __restrict linep, size_t * __restrict linecapp, int delim, if (sappend(linep, &linelen, linecapp, fp->_p, fp->_r)) goto error; if (__srefill(fp)) { - if (__sferror(fp)) + if (!__sfeof(fp)) goto error; goto done; /* hit EOF */ } |