mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Bug #20569 Garbage in DECIMAL results from some mathematical functions
* portability fix: moved the macro call after the C declaration
This commit is contained in:
parent
f829f210b8
commit
ece5fff44e
1 changed files with 1 additions and 1 deletions
|
|
@ -170,8 +170,8 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={
|
||||||
#define ADD(to, from1, from2, carry) /* assume carry <= 1 */ \
|
#define ADD(to, from1, from2, carry) /* assume carry <= 1 */ \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
DBUG_ASSERT((carry) <= 1); \
|
|
||||||
dec1 a=(from1)+(from2)+(carry); \
|
dec1 a=(from1)+(from2)+(carry); \
|
||||||
|
DBUG_ASSERT((carry) <= 1); \
|
||||||
if (((carry)= a >= DIG_BASE)) /* no division here! */ \
|
if (((carry)= a >= DIG_BASE)) /* no division here! */ \
|
||||||
a-=DIG_BASE; \
|
a-=DIG_BASE; \
|
||||||
(to)=a; \
|
(to)=a; \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue