Mercurial > hg > octave-nkf > gnulib-hg
changeset 9825:8620b596f2e0
Use freadptr's return value.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 30 Mar 2008 11:32:20 +0200 |
parents | f09ed4bb510f |
children | c421fead68d3 |
files | ChangeLog lib/freadseek.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-30 Bruno Haible <bruno@clisp.org> + + * lib/freadseek.c (freadseek): Don't ignore the return value of + freadptr. + 2008-03-29 Eric Blake <ebb9@byu.net> Add hex float support.
--- a/lib/freadseek.c +++ b/lib/freadseek.c @@ -34,12 +34,11 @@ return 0; /* Increment the in-memory pointer. This is very cheap (no system calls). */ - freadptr (fp, &buffered); - if (buffered > 0) + if (freadptr (fp, &buffered) != NULL && buffered > 0) { size_t increment = (buffered < offset ? buffered : offset); - /* Keep this code in sync with freadahead and freadptr! */ + /* Keep this code in sync with freadptr! */ #if defined _IO_ferror_unlocked /* GNU libc, BeOS */ fp->_IO_read_ptr += increment; #elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */