Build: Fix warnings found with static analysis

This commit is contained in:
vit9696 2020-03-11 10:18:14 +03:00
parent f3b092dfe7
commit d0e2c8ee9b
3 changed files with 8 additions and 7 deletions

View File

@ -664,6 +664,7 @@ InternalGetDefaultBootEntry (
&DeviceHandle
);
if (EFI_ERROR (Status)) {
BootEntry = NULL;
continue;
}

View File

@ -588,6 +588,8 @@ DTDeleteProperty (
CHAR8 *DeviceTreeEnd;
UINT32 DeleteLength;
ASSERT (mDTLength != NULL);
PropIter = &mOpaquePropIter;
DeletePosition = NULL;
DeviceTreeEnd = (CHAR8 *) mDTRootNode + *mDTLength;
@ -603,9 +605,7 @@ DTDeleteProperty (
//
// Adjust Device Tree Length.
//
if (mDTLength != NULL) {
*mDTLength -= DeleteLength;
}
*mDTLength -= DeleteLength;
//
// Delete Property.
@ -656,6 +656,8 @@ DTInsertProperty (
CHAR8 *DeviceTreeEnd;
CHAR8 *InsertPosition;
ASSERT (mDTLength != NULL);
PropIter = &mOpaquePropIter;
EntryLength = ALIGN_VALUE (ValueLength, sizeof (UINT32));
DeviceTree = NULL;
@ -707,9 +709,7 @@ DTInsertProperty (
//
// Adjust Length.
//
if (mDTLength != NULL) {
*mDTLength += sizeof (DTProperty) + EntryLength;
}
*mDTLength += sizeof (DTProperty) + EntryLength;
}
}
}

View File

@ -223,7 +223,7 @@ OcLoadDrivers (
//
// Driver connection list should be null-terminated.
//
if (*DriversToConnectIterator != NULL) {
if (DriversToConnectIterator != NULL) {
*DriversToConnectIterator = NULL;
}
}