Hacker News new | past | comments | ask | show | jobs | submit login

Those are functions that return more possible success values than failure values. The three common conventions seem to be:

Nonzero: error code, zero: success

Nonzero: one of many possible success values, zero: error (e.g. malloc())

Negative: error code, positive: one of many possible success values

And each has its tradeoffs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: