On 02/04/20 10:55, Markus Armbruster wrote: > > When you return non-null/null or true/false on success/error, neglecting > to document that in a function contract can perhaps be tolerated; you're > using the return type the common, obvious way. But when you return 0/-1 > or 0/-errno, please spell it out. I've seen too many "Operation not > permitted" that were actually -1 mistaken for -EPERM.
Hopefully that would be avoided by the usage of Error itself. Paolo > Also too many > functions that return -1 for some failures and -errno for others.