summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-02-09 11:35:22 +0200
committerunknown <bell@sanja.is.com.ua>2005-02-09 11:35:22 +0200
commit8daa51887da31818fecfa9c157d29dae01816118 (patch)
treeefddb0ebd8ec9b101083b5d5690ce8ed839be169 /strings
parentf4eef98e6eea90e7f5b54a7dcca8778867ecdc8f (diff)
downloadmariadb-git-8daa51887da31818fecfa9c157d29dae01816118.tar.gz
fixed C++ syntax in C code
fixed end of string detection in string->decimal conversion to avoid false alarm about some string part left unconverted (string can be not null terminated) ignore my_decimal.cc in libmysqld directory BitKeeper/etc/ignore: Added libmysqld/my_decimal.cc to the ignore list sql/my_decimal.cc: fixed end of string detection in string->decimal conversion to avoid false alarm about some string part left unconverted (string can be not null terminated) strings/decimal.c: fixed C++ syntax in C code
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 937ceb2f59b..da704280189 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -686,12 +686,13 @@ int decimal_shift(decimal *dec, int shift)
{
/* need to move digits */
int d_shift;
+ dec1 *to, *barier;
if (new_front > 0)
{
/* move left */
d_shift= new_front / DIG_PER_DEC1;
- dec1 *to= dec->buf + (ROUND_UP(beg + 1) - 1 - d_shift);
- dec1 *barier= dec->buf + (ROUND_UP(end) - 1 - d_shift);
+ to= dec->buf + (ROUND_UP(beg + 1) - 1 - d_shift);
+ barier= dec->buf + (ROUND_UP(end) - 1 - d_shift);
DBUG_ASSERT(to >= dec->buf);
DBUG_ASSERT(barier + d_shift < dec->buf + dec->len);
for(; to <= barier; to++)
@@ -704,8 +705,8 @@ int decimal_shift(decimal *dec, int shift)
{
/* move right */
d_shift= (1 - new_front) / DIG_PER_DEC1;
- dec1 *to= dec->buf + ROUND_UP(end) - 1 + d_shift;
- dec1 *barier= dec->buf + ROUND_UP(beg + 1) - 1 + d_shift;
+ to= dec->buf + ROUND_UP(end) - 1 + d_shift;
+ barier= dec->buf + ROUND_UP(beg + 1) - 1 + d_shift;
DBUG_ASSERT(to < dec->buf + dec->len);
DBUG_ASSERT(barier - d_shift >= dec->buf);
for(; to >= barier; to--)