From 47890151b47af55431a808e59af738a35d1a0bb7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 May 2004 02:38:57 +0300 Subject: Portability fixes scripts/mysql_install_db.sh: Portability fix (! is not portable) sql/item_func.cc: Use my_strtoll10() instead of strtoull() sql/repl_failsafe.cc: Use my_strtoll10() instead of strtoull() sql/sql_analyse.cc: Use my_strtoll10() instead of strtoull() sql/sql_yacc.yy: Use my_strtoll10() instead of strtoull() strings/my_strtoll10.c: Fix compiler warnings --- strings/my_strtoll10.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'strings') diff --git a/strings/my_strtoll10.c b/strings/my_strtoll10.c index 6319fbb4d9f..349350c6c7a 100644 --- a/strings/my_strtoll10.c +++ b/strings/my_strtoll10.c @@ -196,15 +196,15 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error) goto overflow; /* Check that we didn't get an overflow with the last digit */ - if (i > cutoff || i == cutoff && (j > cutoff2 || j == cutoff2 && - k > cutoff3)) + if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && + k > cutoff3))) goto overflow; li=i*LFACTOR2+ (ulonglong) j*100 + k; return (longlong) li; overflow: /* *endptr is set here */ *error= MY_ERRNO_ERANGE; - return negative ? LONGLONG_MIN : ULONGLONG_MAX; + return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; end_i: *endptr= (char*) s; -- cgit v1.2.1