vhdx: Simplify vhdx_set_shift_bits()
authorMax Reitz <mreitz@redhat.com>
Fri, 18 Dec 2015 15:04:26 +0000 (16:04 +0100)
committerJeff Cody <jcody@redhat.com>
Mon, 29 Feb 2016 19:54:31 +0000 (14:54 -0500)
commit04a3615860d693cbf5da015ee136a313628a42be
treed410443d0614124021420fc4686fcd551ab3c174
parent939901dcd2093a5d6b40420314d1af8b185ec43c
vhdx: Simplify vhdx_set_shift_bits()

For values which are powers of two (and we do assume all of these to
be), sizeof(x) * 8 - 1 - clz(x) == ctz(x). Therefore, use ctz().

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 1450451066-13335-3-git-send-email-mreitz@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/vhdx.c