From 46d082763ff2d91f4c1d7278a774a8b4f61b6696 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 24 Mar 2021 15:15:30 +0000 Subject: [PATCH] vm-virtio: queue: Fix comment for DescriptorChain::has_next() This returns trues if this descriptor has another descriptor linked to it. Not whether this descriptor chain has another one following it. Signed-off-by: Rob Bradford --- vm-virtio/src/queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm-virtio/src/queue.rs b/vm-virtio/src/queue.rs index 0a1da6064..c6df76843 100644 --- a/vm-virtio/src/queue.rs +++ b/vm-virtio/src/queue.rs @@ -272,7 +272,7 @@ impl<'a> DescriptorChain<'a> { || (self.has_next() && self.next >= self.table_size)) } - /// Gets if this descriptor chain has another descriptor chain linked after it. + /// Gets if this descriptor has another descriptor linked after it. pub fn has_next(&self) -> bool { self.flags & VIRTQ_DESC_F_NEXT != 0 && self.ttl > 1 }