Skip to content
Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fredericdalleau committed Sep 14, 2021
1 parent 10d79f4 commit cf60095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/pci_virtio_block.c
Expand Up @@ -316,7 +316,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq)
case VBH_OP_DISCARD:
/* We currently limit the discard to one segment in the initial negotiation
so expect exactly one correctly-sized payload descriptor. */
assert(iov[1].iov_len = sizeof(struct virtio_blk_discard_write_zeroes));
assert(iov[1].iov_len == sizeof(struct virtio_blk_discard_write_zeroes));
assert(n == 2);
vbdiscard = iov[1].iov_base;
io->io_req.br_offset = (off_t) vbdiscard->sector * DEV_BSIZE;
Expand Down

0 comments on commit cf60095

Please sign in to comment.