Skip to content
Snippets Groups Projects
Commit 04a36158 authored by Hanna Reitz's avatar Hanna Reitz Committed by Jeff Cody
Browse files

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: default avatarMax Reitz <mreitz@redhat.com>
Message-id: 1450451066-13335-3-git-send-email-mreitz@redhat.com
Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
parent 939901dc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment