Commit 9347abfe authored by mskold@mysql.com's avatar mskold@mysql.com

Simplified rounding up to nearest 64-bit boundry

parent 2adabcb3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment