Commit 1c0c25e7 authored by unknown's avatar unknown

Simplified rounding up to nearest 64-bit boundry

parent 677a9936
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
Ndb_local_table_info * Ndb_local_table_info *
Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz)
{ {
Uint32 tot_size= sizeof(NdbTableImpl *) + sz; Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7)>>3)<<3; // round to Uint64
if (sz % 8 != 0)
tot_size += sz % 8; // round to Uint64
void *data= malloc(tot_size); void *data= malloc(tot_size);
if (data == 0) if (data == 0)
return 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