Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2011 20:50:16 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217067 - head/sys/boot/efi/libefi
Message-ID:  <201101062050.p06KoGcY027926@svn.freebsd.org>

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



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