On 05/01/2011 04:21 AM, Bruno Haible wrote:
> 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))

Or even lseek(fileno(fp),0,SEEK_CUR) != -1.

I'll test those options.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to