SecurityPkg: Update code to be more C11 compliant by using __func__
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout SecurityPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
committed by
mergify[bot]
parent
7b82da70ed
commit
dd0b33e3e5
@@ -312,10 +312,10 @@ SyncPcrAllocationsAndPcrMask (
|
||||
NewTpmActivePcrBanks &= BiosHashAlgorithmBitmap;
|
||||
DEBUG ((DEBUG_INFO, "NewTpmActivePcrBanks 0x%08x\n", NewTpmActivePcrBanks));
|
||||
|
||||
DEBUG ((DEBUG_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n", __FUNCTION__, TpmActivePcrBanks, NewTpmActivePcrBanks));
|
||||
DEBUG ((DEBUG_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n", __func__, TpmActivePcrBanks, NewTpmActivePcrBanks));
|
||||
|
||||
if (NewTpmActivePcrBanks == 0) {
|
||||
DEBUG ((DEBUG_ERROR, "%a - No viable PCRs active! Please set a less restrictive value for PcdTpm2HashMask!\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a - No viable PCRs active! Please set a less restrictive value for PcdTpm2HashMask!\n", __func__));
|
||||
ASSERT (FALSE);
|
||||
} else {
|
||||
DEBUG ((DEBUG_ERROR, "Tpm2PcrAllocateBanks (TpmHashAlgorithmBitmap: 0x%08x, NewTpmActivePcrBanks: 0x%08x)\n", TpmHashAlgorithmBitmap, NewTpmActivePcrBanks));
|
||||
@@ -324,7 +324,7 @@ SyncPcrAllocationsAndPcrMask (
|
||||
//
|
||||
// We can't do much here, but we hope that this doesn't happen.
|
||||
//
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to reallocate PCRs!\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to reallocate PCRs!\n", __func__));
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
@@ -342,9 +342,9 @@ SyncPcrAllocationsAndPcrMask (
|
||||
if ((Tpm2PcrMask & TpmHashAlgorithmBitmap) != Tpm2PcrMask) {
|
||||
NewTpm2PcrMask = Tpm2PcrMask & TpmHashAlgorithmBitmap;
|
||||
|
||||
DEBUG ((DEBUG_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\n", __FUNCTION__, Tpm2PcrMask, NewTpm2PcrMask));
|
||||
DEBUG ((DEBUG_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\n", __func__, Tpm2PcrMask, NewTpm2PcrMask));
|
||||
if (NewTpm2PcrMask == 0) {
|
||||
DEBUG ((DEBUG_ERROR, "%a - No viable PCRs supported! Please set a less restrictive value for PcdTpm2HashMask!\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a - No viable PCRs supported! Please set a less restrictive value for PcdTpm2HashMask!\n", __func__));
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user