Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2008 20:09:00 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183985 - head/lib/libkvm
Message-ID:  <200810172009.m9HK90eb096687@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810172009.m9HK90eb096687>