aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-05-13 14:38:04 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-05-13 14:38:04 +0000
commit40dbeed32bca2c7e0b7070bbcd84296000d1271a (patch)
tree624bf10db53bce9bb0dd634f0501ce60e5455956 /usr.sbin/bhyve
parentfdddd267d7fa9751e3c1b7720561b86190e1bd0d (diff)
downloadsrc-40dbeed32bca2c7e0b7070bbcd84296000d1271a.tar.gz
src-40dbeed32bca2c7e0b7070bbcd84296000d1271a.zip
bhyve: replace uninitialized variable "offset".
Use io->io_req.br_offset instead. Suggested by: grehan CID: 1288937
Notes
Notes: svn path=/head/; revision=299675
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r--usr.sbin/bhyve/pci_virtio_block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c
index 8500be6f7007..a437c1c8a94c 100644
--- a/usr.sbin/bhyve/pci_virtio_block.c
+++ b/usr.sbin/bhyve/pci_virtio_block.c
@@ -200,7 +200,6 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq)
int err;
ssize_t iolen;
int writeop, type;
- off_t offset;
struct iovec iov[BLOCKIF_IOV_MAX + 2];
uint16_t idx, flags[BLOCKIF_IOV_MAX + 2];
@@ -249,7 +248,8 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq)
io->io_req.br_resid = iolen;
DPRINTF(("virtio-block: %s op, %zd bytes, %d segs, offset %ld\n\r",
- writeop ? "write" : "read/ident", iolen, i - 1, offset));
+ writeop ? "write" : "read/ident", iolen, i - 1,
+ io->io_req.br_offset));
switch (type) {
case VBH_OP_READ: