Explicitly set errno to 0 before calling strto*.

Suggested by:	mjg
MFC after:	2 weeks
Revert r272122

The patch still needs to be more robust and it broke the
build on MIPS so revert it for now while all the issues
are fixed.

Reported by:	ache, davide
PR:		137307