diff options
Diffstat (limited to 'lib/libvirtio/virtio-serial.c')
-rw-r--r-- | lib/libvirtio/virtio-serial.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libvirtio/virtio-serial.c b/lib/libvirtio/virtio-serial.c index 6234346..d2eac63 100644 --- a/lib/libvirtio/virtio-serial.c +++ b/lib/libvirtio/virtio-serial.c @@ -38,6 +38,7 @@ int virtio_serial_init(struct virtio_device *dev) { struct vring_avail *vq_avail; int status = VIRTIO_STAT_ACKNOWLEDGE; + int i; /* Reset device */ virtio_reset_device(dev); @@ -68,7 +69,7 @@ int virtio_serial_init(struct virtio_device *dev) } /* Prepare receive buffer queue */ - for (int i = 0; i < RX_NUM_ELEMS; i++) { + for (i = 0; i < RX_NUM_ELEMS; i++) { uint64_t addr = (uint64_t)vq_rx.buf_mem + i * RX_ELEM_SIZE; /* Descriptor for data: */ |