Help static analysis by initializing variables that we know cannot be

used uninitialized, but which cannot be inferred from the code itself.
This commit is contained in:
Marcel Moolenaar 2011-01-06 20:50:16 +00:00
parent fbf0af3fcb
commit 1f60bb276b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217067
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);