diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-19 19:19:53 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-20 14:47:08 +0100 |
commit | 22953364f4f1f8fd27e08a02d480492be6c9960b (patch) | |
tree | 3399c02bcbd7a96339efcd02332fb3fd98b5931b /hw/virtio | |
parent | 9842a9cfdddfdc983f2ec09772a896be10c7373e (diff) | |
download | qemu-22953364f4f1f8fd27e08a02d480492be6c9960b.zip qemu-22953364f4f1f8fd27e08a02d480492be6c9960b.tar.gz qemu-22953364f4f1f8fd27e08a02d480492be6c9960b.tar.bz2 |
hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/virtio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 2c5410e..9d06dbe 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1293,7 +1293,7 @@ static void virtqueue_undo_map_desc(unsigned int out_num, unsigned int in_num, static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg, hwaddr *addr, unsigned int num_sg, - int is_write) + bool is_write) { unsigned int i; hwaddr len; @@ -1317,8 +1317,9 @@ static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg, void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) { - virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, 1); - virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, 0); + virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, true); + virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, + false); } static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num) |