standard library functions are allowed to change errno even on success and thus setting errno to 0 before calling something typically doesn't do much (with exceptions such as strtoll() where it's documented recommendation to set errno to 0 before calling).
saving and restoring errno is typically done inside non-fatal signal handlers so that the resuming code isn't impacted by the clobbered errno. no reason to do it in a string to integer conversion routine.
standard library functions are allowed to change errno even on success and thus setting errno to 0 before calling something typically doesn't do much (with exceptions such as strtoll() where it's documented recommendation to set errno to 0 before calling).
saving and restoring errno is typically done inside non-fatal signal handlers so that the resuming code isn't impacted by the clobbered errno. no reason to do it in a string to integer conversion routine.
also fix a small indentation issue.