Set errno to 0 before calling strto*

It is not guaranteed that errno is set to 0 when there is no
overflow/underflow, so it needs to be set to 0 before, in case it
already is ERANGE from a previous call.