mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
Build: Fix some svace analysis issues
This commit is contained in:
parent
ddb9862b34
commit
46e8b4b4d3
@ -226,6 +226,7 @@ InternalFindFirstDmgFileName (
|
||||
EFI_FILE_INFO *FileInfo;
|
||||
BOOLEAN NoFile;
|
||||
UINTN ExtOffset;
|
||||
UINTN Length;
|
||||
INTN Result;
|
||||
|
||||
ASSERT (Directory != NULL);
|
||||
@ -239,7 +240,15 @@ InternalFindFirstDmgFileName (
|
||||
continue;
|
||||
}
|
||||
|
||||
ExtOffset = (StrLen (FileInfo->FileName) - L_STR_LEN (L".dmg"));
|
||||
//
|
||||
// Discard filenames that do not contain characters prior to .dmg extension.
|
||||
//
|
||||
Length = StrLen (FileInfo->FileName);
|
||||
if (Length <= L_STR_LEN (L".dmg")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ExtOffset = Length - L_STR_LEN (L".dmg");
|
||||
Result = StrCmp (&FileInfo->FileName[ExtOffset], L".dmg");
|
||||
if (Result == 0) {
|
||||
if (FileNameLen != NULL) {
|
||||
|
||||
@ -246,7 +246,7 @@ AppleRtcRamReset (
|
||||
UINTN Index;
|
||||
UINT8 Buffer[APPLE_RTC_TOTAL_SIZE];
|
||||
|
||||
ZeroMem (Buffer, sizeof (APPLE_RTC_TOTAL_SIZE));
|
||||
ZeroMem (Buffer, sizeof (Buffer));
|
||||
|
||||
for (Index = APPLE_RTC_CHECKSUM_START; Index < APPLE_RTC_CORE_SIZE; ++Index) {
|
||||
Status = SyncRtcWaitForReady ();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user