summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-05-12 02:38:57 +0300
committermonty@mysql.com <>2004-05-12 02:38:57 +0300
commit894e8fca6e3882795df7b371fbc56f9236d42a14 (patch)
tree02e8baaa5fa67d84f1517dd0fe43ee84dd6ef34f /strings
parent6c4b8d3499ee6cdac9dadb7291247f33d323003a (diff)
downloadmariadb-git-894e8fca6e3882795df7b371fbc56f9236d42a14.tar.gz
Portability fixes
Diffstat (limited to 'strings')
-rw-r--r--strings/my_strtoll10.c6
1 files changed, 3 insertions, 3 deletions
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;