From 67108bdfa781a278aee92f1a6118116931b9e10f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Mar 2004 12:53:27 +0200 Subject: Optimizations mysql-test/r/create.result: Changed ERROR -> NOTE (for enum/set) sql/lock.cc: Removed not needed test (table_list->db is always set) sql/sql_repl.cc: Removed not needed test sql/sql_table.cc: ERROR -> NOTE Removed not needed test strings/strtod.c: Portabilty fix. (DBL_MAX *10 is not safe) --- strings/strtod.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'strings/strtod.c') diff --git a/strings/strtod.c b/strings/strtod.c index a06b74248cb..4c3f31bc00c 100644 --- a/strings/strtod.c +++ b/strings/strtod.c @@ -36,6 +36,11 @@ static double scaler1[] = { 1.0, 10.0, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9 }; + +#ifndef HUGE_VAL /* Should be +Infinitive */ +#define HUGE_VAL DBL_MAX +#endif + double my_strtod(const char *str, char **end) { double result= 0.0; @@ -90,10 +95,7 @@ double my_strtod(const char *str, char **end) } if (exp >= 1000) { - if (neg) - result= 0.0; - else - result= DBL_MAX*10; + result= neg ? 0.0 : HUGE_VAL; goto done; } while (exp >= 100) -- cgit v1.2.1