On 7/26/2017 3:14 AM, Timon Gehr wrote:
On 26.07.2017 05:02, Walter Bright wrote:
The implementation checks for fp being NULL and returns EOF if it is.

The C mindset is that this check is a waste of precious processing resources and morally wrong, as only a fool would pass NULL anyway, and fools deserve to get UB.

I wrote that code 30+ years ago, and no longer remember why I put the null check in. It might have been because other C compiler libraries did it.

Reply via email to