Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What is your take on checking return values?. Parent comment
void got_error(void){ char err[] = "Error!\n"; int len = strlen(err); int ret = printf(err); if(len != ret) got_error(); }
Er, but maybe the error routine should also return an error flag in that case? The caller could then check it and call the error routine if needed.
There are no comments on this comment yet.
Er, but maybe the error routine should also return an error flag in that case? The caller could then check it and call the error routine if needed.