Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a matter of conventions. Look at Linux kernel for instance. Error codes are positive, but if function is returning error, then return code is -error, i.e. negative and it's pretty sensible solution. Mind that in case of syscalls, errno stuff comes from glibc, which wraps syscalls to set errno and return -1. So searching for -error is not something awkward, but, as stated earlier, you have to quote it in google to make it work.


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

Search: