Skip to content

Commit

Permalink
cleanup: refactored initialization of htable from memcpy to assignment
Browse files Browse the repository at this point in the history
- this removes one compiler warning from the build
  • Loading branch information
franku committed Jun 8, 2018
1 parent 40fcfee commit 9bd9e7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/lib/htable.cc
Expand Up @@ -280,7 +280,12 @@ void htable::grow_table()
* Setup a bigger table.
*/
big = (htable *)malloc(sizeof(htable));
memcpy(big, this, sizeof(htable)); /* Start with original class data */
big->hash = hash;
big->total_size = total_size;
big->extend_length = extend_length;
big->index = index;
big->blocks = blocks;
big->mem_block = mem_block;
big->loffset = loffset;
big->mask = mask<<1 | 1;
big->rshift = rshift - 1;
Expand Down

0 comments on commit 9bd9e7e

Please sign in to comment.