Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/scsi/scsi-disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index a53f058621..660d068390 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2620,8 +2620,8 @@ static BlockAIOCB *scsi_block_do_sgio(SCSIBlockReq *req, * reads and writes that are not aligned to one logical sectors * _and_ cover multiple MemoryRegions. */ - assert(offset % s->qdev.blocksize == 0); - assert(iov->size % s->qdev.blocksize == 0); + assert(QEMU_IS_ALIGNED(offset, s->qdev.blocksize)); + assert(QEMU_IS_ALIGNED(iov->size, s->qdev.blocksize)); io_header->interface_id = 'S'; -- 2.13.2