On Aug 31, 1999, Nick Burrett nick@dsvr.net wrote:
That's not covered in the original code. Since I've never heard of fwrite returning less than -1, I think it is as correct as the original code.
I'm suggesting that perhaps you stumbled across a proper bug. According to the man pages fwrite returns 0 on error and >0 on success.
Indeed. So you (we, if you will :-) don't even need ssize_t, size_t and `== 0' will do.