summaryrefslogtreecommitdiff
path: root/strings/decimal.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-07-28 16:10:14 +0300
committermonty@mysql.com <>2005-07-28 16:10:14 +0300
commitb3cbd0048fe5fe36fe4fba9ce591b0d1b26e10a1 (patch)
treeaf22629d2c36ae4196e6f23584c4cecc393b874e /strings/decimal.c
parent510d9a19e1dc52a4d07fb5c601cd4cb3dd6aca4a (diff)
downloadmariadb-git-b3cbd0048fe5fe36fe4fba9ce591b0d1b26e10a1.tar.gz
Cleanups during review of new code
Ensure mysql_close() is called if mysql_set_character_set() fails
Diffstat (limited to 'strings/decimal.c')
-rw-r--r--strings/decimal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 1d75502f0da..ca92ace92e1 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -745,14 +745,17 @@ int decimal_shift(decimal_t *dec, int shift)
new_point= ROUND_UP(new_point) - 1;
if (new_point > end)
+ {
do
{
dec->buf[new_point]=0;
- }while (--new_point > end);
+ } while (--new_point > end);
+ }
else
+ {
for (; new_point < beg; new_point++)
dec->buf[new_point]= 0;
-
+ }
dec->intg= digits_int;
dec->frac= digits_frac;
return err;