Re: [PATCH] Fix return value checking of fread() in iolog.c

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

 



On 4/4/18 5:18 PM, Rebecca Cran wrote:
> According to http://pubs.opengroup.org/onlinepubs/7908799/xsh/fread.html
> fread() returns a size_t, not ssize_t, and returns a value of 0 on
> both eof and an error. Therefore, check both feof() and ferror() to
> determine whether the call succeeded.

Thanks Rebecca, applied.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux