[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/15] virito-blk: drop duplicate check
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 15/15] virito-blk: drop duplicate check |
Date: |
Wed, 24 Jun 2015 16:28:06 +0100 |
From: Gonglei <address@hidden>
in_num = req->elem.in_num, and req->elem.in_num is
checked in line 489, so the check about in_num variable
is superflous, let's drop it.
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/block/virtio-blk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index bbb1fc1..6aefda4 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -499,8 +499,7 @@ void virtio_blk_handle_request(VirtIOBlockReq *req,
MultiReqBuffer *mrb)
iov_discard_front(&iov, &out_num, sizeof(req->out));
- if (in_num < 1 ||
- in_iov[in_num - 1].iov_len < sizeof(struct virtio_blk_inhdr)) {
+ if (in_iov[in_num - 1].iov_len < sizeof(struct virtio_blk_inhdr)) {
error_report("virtio-blk request inhdr too short");
exit(1);
}
--
2.4.3
- [Qemu-devel] [PULL 05/15] util/hbitmap: Add an API to reset all set bits in hbitmap, (continued)
- [Qemu-devel] [PULL 05/15] util/hbitmap: Add an API to reset all set bits in hbitmap, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 07/15] nvme: Fix memleak in nvme_dma_read_prp, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 06/15] vvfat: add a label option, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 08/15] block: Use bdrv_is_sg() everywhere, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 09/15] Fix migration in case of scsi-generic, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 10/15] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 11/15] raw-posix: Use DPRINTF for DEBUG_FLOPPY, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 13/15] iov: don't touch iov in iov_send_recv(), Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 12/15] raw-posix: Introduce hdev_is_sg(), Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 14/15] qemu-iotests: fix 051.out after qdev error message change, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 15/15] virito-blk: drop duplicate check,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PULL 00/15] Block patches, Peter Maydell, 2015/06/25