Not sure if it's safe to check for `errno` like that. It's global, so maybe it could be set by someone else before, making the program believe that `strtol` is to be blamed.

I mean, I don't have a problem with this approach unless we explicitly set `errno = 0` prior to the `strtol` call.