As everybody knows, C allows us to write anything we want. There comes one big problem — we are the only who responsible to handle errors and, therefore, write reliable code. The goal is to make writing reliable code easier. I have an idea to wrap standard functions so that we can’t hide errors. If we want to ignore errors, we’ll need to explicitly do that. This code show my solution: ```c void safe_access (bool *ok, const char *path, int amode) { // reset error *ok = true; errno = 0; int ret = access(path, amode); // indicate error if (ret) { *ok = false; } } ``` This functuon wraps access(3) from unistd.h. It solves the followind three problems: 1. It resets errno, so we won’t be able to check for old errno: ```c // this function sets errno access(...); // we forget to reset errno and everything seems to be OK // now, we want to check for errno // but, unfortunately, we’re prone to check old errno that comes from access() long a = strtol(...); if (... && errno) { } ``` 2. It disallows us to forget handling errors. Even when we want to ignore errors, we need to explicitly do that: ```c bool ok; safe_access(&ok, ...); // we need something to do with `ok` ``` Also, we can tune warnings to disallow us to keep variables unused. 3. Everybody will check errors the same way. Checking for NULL, non-zero, negative values — everything is done inside wrappers. Any critics, advices?