1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2004-05-12 02:38:57 +03:00
parent cd8f9ed2a2
commit 47890151b4
6 changed files with 38 additions and 21 deletions

View File

@ -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;