Re:Principles for C programming
by ktRolster on Thursday March 16, 2017 @03:30AM
(#13883192)
I did find this line of code quite entertaining:
If you're going to go to the effort to add the comment, why not just use stdout instead of 1?
[ Parent
| on HN ]
indeed, it's just a naive example but wouldn't something like
int written = write(STDOUT_FILENO, toWrite, len);
if (written != len)
{ ...
be simpler ?