diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-10-08 00:46:10 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-10-08 00:46:10 +0200 |
commit | 104771de9a6fe9ef1b02224d0c1a81178a326121 (patch) | |
tree | 085506f6413083d5322c4430b61f2ec71de50630 /strings | |
parent | c1a4f0c5ab4ceef28900c1bd0a899ccad5725d8b (diff) | |
download | mariadb-git-104771de9a6fe9ef1b02224d0c1a81178a326121.tar.gz |
decimal: *correct* implementation of ROUND_UP at last
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index 8d6877a24ec..07ccc537e47 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -137,7 +137,7 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={ static inline int ROUND_UP(int x) { - return (x + (x > 0 ? 1 : -1) * (DIG_PER_DEC1 - 1)) / DIG_PER_DEC1; + return (x + (x > 0 ? DIG_PER_DEC1 - 1 : 0)) / DIG_PER_DEC1; } #ifdef HAVE_valgrind |