Malloc return 0 is a failure, but open return 0 is success. It's just inconsistent, and it's definitely an age and context thing.
Rust's Result api are a pretty great solution. Not sure what other options are out there though.
Malloc return 0 is a failure, but open return 0 is success. It's just inconsistent, and it's definitely an age and context thing.
Rust's Result api are a pretty great solution. Not sure what other options are out there though.