On 18/11/2014, Dimitris Papastamos <s...@2f30.org> wrote: > On a side note here, for a failing syscall or similar, I think the > idea is to check for < 0 rather than == -1. I am not opposed to the > latter except that is already used less frequently in sbase.
On an edge note, it would be much saner for many syscalls and libc functions to return minus the error code rather than return -1 and set errno, and in the future suckless-dominated world we could do so. The OpenBSD kernel already often does so internally. To check < 0 rather than == -1 would ease transition. Oh, and MAP_FAILED == 0 ought.