diff options
author | marcel <marcel@FreeBSD.org> | 2011-01-06 20:50:16 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-01-06 20:50:16 +0000 |
commit | 668954c42f4a580d517d0b3d52266f984a5eca9a (patch) | |
tree | 371065c686392b3de9b814b0d5d23b557d166c8d /sys/boot/efi/libefi | |
parent | 046d272b7747c06fd2a5e8c9ab640e5dfc88d251 (diff) | |
download | FreeBSD-src-668954c42f4a580d517d0b3d52266f984a5eca9a.zip FreeBSD-src-668954c42f4a580d517d0b3d52266f984a5eca9a.tar.gz |
Help static analysis by initializing variables that we know cannot be
used uninitialized, but which cannot be inferred from the code itself.
Diffstat (limited to 'sys/boot/efi/libefi')
-rw-r--r-- | sys/boot/efi/libefi/efinet.c | 1 | ||||
-rw-r--r-- | sys/boot/efi/libefi/efipart.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/efi/libefi/efinet.c b/sys/boot/efi/libefi/efinet.c index 1eea860..5b3e401 100644 --- a/sys/boot/efi/libefi/efinet.c +++ b/sys/boot/efi/libefi/efinet.c @@ -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); diff --git a/sys/boot/efi/libefi/efipart.c b/sys/boot/efi/libefi/efipart.c index 4c8c170..4abac06 100644 --- a/sys/boot/efi/libefi/efipart.c +++ b/sys/boot/efi/libefi/efipart.c @@ -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); |