From owner-svn-src-stable@FreeBSD.ORG Thu Jun 20 21:29:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E458C1B; Thu, 20 Jun 2013 21:29:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD471845; Thu, 20 Jun 2013 21:29:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5KLT3tt084040; Thu, 20 Jun 2013 21:29:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5KLT387084039; Thu, 20 Jun 2013 21:29:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201306202129.r5KLT387084039@svn.freebsd.org> From: Xin LI Date: Thu, 20 Jun 2013 21:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r252044 - stable/9/usr.sbin/kldxref X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 21:29:04 -0000 Author: delphij Date: Thu Jun 20 21:29:03 2013 New Revision: 252044 URL: http://svnweb.freebsd.org/changeset/base/252044 Log: MFC r251440: use calloc(). Modified: stable/9/usr.sbin/kldxref/ef_obj.c Directory Properties: stable/9/usr.sbin/kldxref/ (props changed) Modified: stable/9/usr.sbin/kldxref/ef_obj.c ============================================================================== --- stable/9/usr.sbin/kldxref/ef_obj.c Thu Jun 20 21:19:47 2013 (r252043) +++ stable/9/usr.sbin/kldxref/ef_obj.c Thu Jun 20 21:29:03 2013 (r252044) @@ -343,7 +343,7 @@ ef_obj_open(const char *filename, struct if ((fd = open(filename, O_RDONLY)) == -1) return errno; - ef = malloc(sizeof(*ef)); + ef = calloc(1, sizeof(*ef)); if (ef == NULL) { close(fd); return (ENOMEM); @@ -352,7 +352,6 @@ ef_obj_open(const char *filename, struct efile->ef_ef = ef; efile->ef_ops = &ef_obj_file_ops; - bzero(ef, sizeof(*ef)); ef->ef_verbose = verbose; ef->ef_fd = fd; ef->ef_name = strdup(filename);