From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 20:09:00 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EEA81065686; Fri, 17 Oct 2008 20:09:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE768FC1C; Fri, 17 Oct 2008 20:09:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9HK90ZJ096689; Fri, 17 Oct 2008 20:09:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9HK90eb096687; Fri, 17 Oct 2008 20:09:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810172009.m9HK90eb096687@svn.freebsd.org> From: Xin LI Date: Fri, 17 Oct 2008 20:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183985 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2008 20:09:00 -0000 Author: delphij Date: Fri Oct 17 20:09:00 2008 New Revision: 183985 URL: http://svn.freebsd.org/changeset/base/183985 Log: _kvm_malloc allocates memory through calloc() which returns zeroed memory, so don't redo the initialization. Modified: head/lib/libkvm/kvm_minidump_amd64.c head/lib/libkvm/kvm_minidump_i386.c Modified: head/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_amd64.c Fri Oct 17 19:52:35 2008 (r183984) +++ head/lib/libkvm/kvm_minidump_amd64.c Fri Oct 17 20:09:00 2008 (r183985) @@ -146,7 +146,6 @@ _kvm_minidump_initvtop(kvm_t *kd) return (-1); } kd->vmst = vmst; - bzero(vmst, sizeof(*vmst)); vmst->minidump = 1; if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) { Modified: head/lib/libkvm/kvm_minidump_i386.c ============================================================================== --- head/lib/libkvm/kvm_minidump_i386.c Fri Oct 17 19:52:35 2008 (r183984) +++ head/lib/libkvm/kvm_minidump_i386.c Fri Oct 17 20:09:00 2008 (r183985) @@ -148,7 +148,6 @@ _kvm_minidump_initvtop(kvm_t *kd) return (-1); } kd->vmst = vmst; - bzero(vmst, sizeof(*vmst)); vmst->minidump = 1; if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) {