What the hell was I thinking when I said system calls return 0 on error?
Pfffft /me puts the crack pipe down.
For standard i/o functions do you really want to rely on -1 being EOF? I always compare the return value against EOF, which depending on implementation is not necessarily -1.
|