From owner-svn-src-all@FreeBSD.ORG Thu Jan 6 20:50:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0923B106566C; Thu, 6 Jan 2011 20:50:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E951D8FC19; Thu, 6 Jan 2011 20:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p06KoGDK027929; Thu, 6 Jan 2011 20:50:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p06KoGcY027926; Thu, 6 Jan 2011 20:50:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201101062050.p06KoGcY027926@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 6 Jan 2011 20:50:16 +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: r217067 - head/sys/boot/efi/libefi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 06 Jan 2011 20:50:18 -0000 Author: marcel Date: Thu Jan 6 20:50:16 2011 New Revision: 217067 URL: http://svn.freebsd.org/changeset/base/217067 Log: Help static analysis by initializing variables that we know cannot be used uninitialized, but which cannot be inferred from the code itself. Modified: head/sys/boot/efi/libefi/efinet.c head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Thu Jan 6 20:31:33 2011 (r217066) +++ head/sys/boot/efi/libefi/efinet.c Thu Jan 6 20:50:16 2011 (r217067) @@ -262,6 +262,7 @@ efinet_dev_init() int err, i, nifs; sz = 0; + handles = NULL; status = BS->LocateHandle(ByProtocol, &sn_guid, 0, &sz, 0); if (status == EFI_BUFFER_TOO_SMALL) { handles = (EFI_HANDLE *)malloc(sz); Modified: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- head/sys/boot/efi/libefi/efipart.c Thu Jan 6 20:31:33 2011 (r217066) +++ head/sys/boot/efi/libefi/efipart.c Thu Jan 6 20:50:16 2011 (r217067) @@ -69,6 +69,7 @@ efipart_init(void) int err; sz = 0; + hin = NULL; status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); if (status == EFI_BUFFER_TOO_SMALL) { hin = (EFI_HANDLE *)malloc(sz * 2);