mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Fix clippy - manually reimplementing div_ceil
Reported by 1.86.0-beta.1 (f0cb41030 2025-02-17). Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
@@ -502,7 +502,7 @@ impl QcowFile {
|
||||
if refcount_bits != 16 {
|
||||
return Err(Error::UnsupportedRefcountOrder);
|
||||
}
|
||||
let refcount_bytes = (refcount_bits + 7) / 8;
|
||||
let refcount_bytes = refcount_bits.div_ceil(8);
|
||||
|
||||
// Need at least one refcount cluster
|
||||
if header.refcount_table_clusters == 0 {
|
||||
|
||||
Reference in New Issue
Block a user