bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fclose: don't fail on non-seekable input stream


From: Bruno Haible
Subject: Re: [PATCH] fclose: don't fail on non-seekable input stream
Date: Sun, 1 May 2011 12:21:58 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> +  /* We only need to flush the file if it is not reading or if it is
> +     seekable.  */
> +  if ((!freading (fp) || fseeko (fp, 0, SEEK_CUR) == 0) && fflush (fp))

Would it be equivalent to do

     if ((!freading (fp) || ftello (fp) != -1) && fflush (fp))

?

Bruno
-- 
In memoriam Itzhak Katzenelson <http://en.wikipedia.org/wiki/Itzhak_Katzenelson>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]