Skip to content

Commit 7f3e399

Browse files
RoyLinRoyLin
authored andcommitted
fix(snapshot): parenthesize cast in queue-index reconciliation (parse error)
1 parent e029095 commit 7f3e399

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/devices/src/virtio/mmio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@ impl MmioTransport {
289289
if let Ok(ram_used) =
290290
self.mem.read_obj::<u16>(vm_memory::GuestAddress(q.used_ring + 2))
291291
{
292-
if q.next_used.wrapping_sub(ram_used) as i16 < 0 {
292+
if (q.next_used.wrapping_sub(ram_used) as i16) < 0 {
293293
q.next_used = ram_used;
294294
}
295-
if q.next_avail.wrapping_sub(ram_used) as i16 < 0 {
295+
if (q.next_avail.wrapping_sub(ram_used) as i16) < 0 {
296296
q.next_avail = ram_used;
297297
}
298298
}

0 commit comments

Comments
 (0)