summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2005-03-22 22:12:24 +0100
committerunknown <mskold@mysql.com>2005-03-22 22:12:24 +0100
commit1c0c25e7473c5ad68876aea848a8f7ad480333f7 (patch)
tree529fed94ac23da283abeb76e86d839bb85d088e7 /ndb
parent677a9936a1e74fb3af3051eb25c2c288377c82be (diff)
downloadmariadb-git-1c0c25e7473c5ad68876aea848a8f7ad480333f7.tar.gz
Simplified rounding up to nearest 64-bit boundry
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/ndbapi/DictCache.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp
index ca6c185c07d..9cdd68272ad 100644
--- a/ndb/src/ndbapi/DictCache.cpp
+++ b/ndb/src/ndbapi/DictCache.cpp
@@ -24,9 +24,7 @@
Ndb_local_table_info *
Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz)
{
- Uint32 tot_size= sizeof(NdbTableImpl *) + sz;
- if (sz % 8 != 0)
- tot_size += sz % 8; // round to Uint64
+ Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7)>>3)<<3; // round to Uint64
void *data= malloc(tot_size);
if (data == 0)
return 0;