Author: pfg
Date: Fri May 13 14:38:04 2016
New Revision: 299675
URL: https://svnweb.freebsd.org/changeset/base/299675
Log:
bhyve: replace uninitialized variable "offset".
Use io->io_req.br_offset instead.
Suggested by: grehan
CID: 1288937
Modified:
head/usr.sbin/bhyve/pci_virtio_block.c
Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_block.c Fri May 13 13:01:02 2016
(r299674)
+++ head/usr.sbin/bhyve/pci_virtio_block.c Fri May 13 14:38:04 2016
(r299675)
@@ -200,7 +200,6 @@ pci_vtblk_proc(struct pci_vtblk_softc *s
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 *s
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:
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"