hw/xen_disk: Remove unused local variable

cppcheck report:
hw/xen_disk.c:309: style:
 Variable 'len' is assigned a value that is never used

Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Stefan Weil 2011-05-08 09:01:52 +02:00 committed by Kevin Wolf
parent 4ee964184f
commit 1e71db3087

View file

@ -316,7 +316,7 @@ static int ioreq_map(struct ioreq *ioreq)
static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
{
struct XenBlkDev *blkdev = ioreq->blkdev;
int i, rc, len = 0;
int i, rc;
off_t pos;
if (ioreq->req.nr_segments && ioreq_map(ioreq) == -1) {
@ -339,7 +339,6 @@ static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
ioreq->v.iov[i].iov_len);
goto err;
}
len += ioreq->v.iov[i].iov_len;
pos += ioreq->v.iov[i].iov_len;
}
break;
@ -359,7 +358,6 @@ static int ioreq_runio_qemu_sync(struct ioreq *ioreq)
ioreq->v.iov[i].iov_len);
goto err;
}
len += ioreq->v.iov[i].iov_len;
pos += ioreq->v.iov[i].iov_len;
}
break;