]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Clear unused part of the map in virBitmapShrink
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 1 Feb 2018 13:33:02 +0000 (14:33 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 2 Feb 2018 13:51:32 +0000 (14:51 +0100)
commitd6e582da80d07a90f154dc27aca239d44fc2b7b7
tree6c195e8cd98b4c2af947f2e1a3655102835d961a
parent679543449c0488f3b6f4c5671eee70a86cfa03ec
util: Clear unused part of the map in virBitmapShrink

Some of the other functions depend on the fact that unused bits and longs are
always zero and it's less error-prone to clear it than fix the other functions.
It's enough to zero out one piece of the map since we're calling realloc() to
get rid of the rest (and updating map_len).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540817

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_conf.c
src/util/virbitmap.c
src/util/virbitmap.h
src/util/virresctrl.c
tests/virbitmaptest.c