mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-allocator: Remove a redundant check for zero
alignment.is_power_of_two() already implies alignment != 0. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
committed by
Rob Bradford
parent
814e8edc0c
commit
0a7c613da0
@@ -174,7 +174,7 @@ impl AddressAllocator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let alignment = align_size.unwrap_or(4);
|
let alignment = align_size.unwrap_or(4);
|
||||||
if !alignment.is_power_of_two() || alignment == 0 {
|
if !alignment.is_power_of_two() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user