Skip to content

Commit f896954

Browse files
committed
chore: fix uffd example compile warning
usize cannot be negative Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 084b7a8 commit f896954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/firecracker/examples/uffd/uffd_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl UffdHandler {
191191

192192
fn zero_out(&mut self, addr: u64) -> bool {
193193
match unsafe { self.uffd.zeropage(addr as *mut _, self.page_size, true) } {
194-
Ok(r) if r >= 0 => true,
194+
Ok(_) => true,
195195
Err(Error::ZeropageFailed(error)) if error as i32 == libc::EAGAIN => false,
196196
r => panic!("Unexpected zeropage result: {:?}", r),
197197
}

0 commit comments

Comments
 (0)