mirror of https://github.com/acidanthera/audk.git
SecurityPkg/RngDxe: fix warning about uninitialized variable
ArmTrng.c: In function 'GenerateEntropy': ArmTrng.c:40:15: error: 'Status' may be used uninitialized in this function [-Werror=maybe-uninitialized] EFI_STATUS Status; ^~~~~~ cc1: all warnings being treated as errors Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
This commit is contained in:
parent
c58501aa1a
commit
ceb87029c5
|
@ -44,6 +44,10 @@ GenerateEntropy (
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN MaxBits;
|
UINTN MaxBits;
|
||||||
|
|
||||||
|
if ((Length == 0) || (Entropy == NULL)) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
ZeroMem (Entropy, Length);
|
ZeroMem (Entropy, Length);
|
||||||
|
|
||||||
RequiredEntropyBits = (Length << 3);
|
RequiredEntropyBits = (Length << 3);
|
||||||
|
@ -67,5 +71,5 @@ GenerateEntropy (
|
||||||
Index += (EntropyBits >> 3);
|
Index += (EntropyBits >> 3);
|
||||||
} // while
|
} // while
|
||||||
|
|
||||||
return Status;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue