From owner-svn-src-all@freebsd.org Fri May 13 14:38:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08435B3AB73; Fri, 13 May 2016 14:38:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9C1710E3; Fri, 13 May 2016 14:38:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4DEc4uh078129; Fri, 13 May 2016 14:38:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4DEc4DS078127; Fri, 13 May 2016 14:38:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605131438.u4DEc4DS078127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 13 May 2016 14:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299675 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 14:38:06 -0000 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: