Ensure errno is zeroed before testing it