* util.c (ruby_strtod): clear errno at the top of our own

impelementation of strtod(3).  [ruby-dev:34834] [ruby-dev:34839]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-05-26 07:51:46 +00:00
parent cf5cf236d7
commit c2257734e3
3 changed files with 3 additions and 5 deletions

View file

@ -2045,7 +2045,6 @@ rb_cstr_to_dbl(const char *p, int badcheck)
if (!p) return 0.0;
q = p;
while (ISSPACE(*p)) p++;
errno = 0;
d = strtod(p, &end);
if (errno == ERANGE) {
OutOfRange();