Skip to content

Commit cf60095

Browse files
Fix assertion turned into assignment
The qassertion is supposed to check the value but the typo makes it an assignment. Hence it is always true, Signed-off-by: Frederic Dalleau <frederic.dalleau@docker.com>
1 parent 10d79f4 commit cf60095

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/pci_virtio_block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq)
316316
case VBH_OP_DISCARD:
317317
/* We currently limit the discard to one segment in the initial negotiation
318318
so expect exactly one correctly-sized payload descriptor. */
319-
assert(iov[1].iov_len = sizeof(struct virtio_blk_discard_write_zeroes));
319+
assert(iov[1].iov_len == sizeof(struct virtio_blk_discard_write_zeroes));
320320
assert(n == 2);
321321
vbdiscard = iov[1].iov_base;
322322
io->io_req.br_offset = (off_t) vbdiscard->sector * DEV_BSIZE;

0 commit comments

Comments
 (0)