Our functions return negative error codes. Do not rely on errno being set after calling our own functions.