Full threaddezgeg·Linux uses a similar thing: functions that return pointers and that can fail typically return the negated error code cast directly into a pointer: http://lxr.free-electrons.com/source/include/linux/err.h#L23View on HN