hbitmap: fix missing restore count when finish deserialization

The .count of HBitmap is forgot to set in function
hbitmap_deserialize_finish, let's set it to the right value.

Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: Fam Zheng <famz@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>
Signed-off-by: Liang Li <liliangleo@didichuxing.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20180118131308.GA2181@liangdeMacBook-Pro.local
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Liang Li 2018-02-07 11:35:49 -05:00 committed by John Snow
parent 0833df03f4
commit 3260cdfffb
1 changed files with 1 additions and 0 deletions

View File

@ -630,6 +630,7 @@ void hbitmap_deserialize_finish(HBitmap *bitmap)
}
bitmap->levels[0][0] |= 1UL << (BITS_PER_LONG - 1);
bitmap->count = hb_count_between(bitmap, 0, bitmap->size - 1);
}
void hbitmap_free(HBitmap *hb)