diff options
author | Gonglei <arei.gonglei@huawei.com> | 2015-06-24 17:29:24 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-06-24 16:16:04 +0100 |
commit | 12048545019cd1d64c8147ea9277648e685fa489 (patch) | |
tree | 50e33fdbb3cdec1e55a0f094a580500ad0e24e1b /hw/block | |
parent | a30c4eb2ce7b2c15ab556be3cfe2340c17271ddd (diff) | |
download | qemu-12048545019cd1d64c8147ea9277648e685fa489.zip qemu-12048545019cd1d64c8147ea9277648e685fa489.tar.gz qemu-12048545019cd1d64c8147ea9277648e685fa489.tar.bz2 |
virito-blk: drop duplicate check
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 <arei.gonglei@huawei.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1435138164-11728-1-git-send-email-arei.gonglei@huawei.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/virtio-blk.c | 3 |
1 files changed, 1 insertions, 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); } |