mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
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:
parent
fbf0af3fcb
commit
1f60bb276b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217067
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user