CryptoPkg: 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
CryptoPkg.

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:
Rebecca Cran 2023-04-06 13:53:10 -06:00 committed by mergify[bot]
parent f1d31a6ec7
commit 74ce342f18
2 changed files with 6 additions and 6 deletions

View File

@ -331,7 +331,7 @@ TlsSetCipherList (
DEBUG_VERBOSE, DEBUG_VERBOSE,
"%a:%a: skipping CipherId=0x%04x\n", "%a:%a: skipping CipherId=0x%04x\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
CipherId[Index] CipherId[Index]
)); ));
// //
@ -380,7 +380,7 @@ TlsSetCipherList (
DEBUG_ERROR, DEBUG_ERROR,
"%a:%a: no CipherId could be mapped\n", "%a:%a: no CipherId could be mapped\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__ __func__
)); ));
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
goto FreeMappedCipher; goto FreeMappedCipher;
@ -441,7 +441,7 @@ TlsSetCipherList (
DEBUG_VERBOSE, DEBUG_VERBOSE,
"%a:%a: CipherString={\n", "%a:%a: CipherString={\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__ __func__
)); ));
for (CipherStringPosition = CipherString; for (CipherStringPosition = CipherString;
CipherStringPosition < CipherString + FullLength; CipherStringPosition < CipherString + FullLength;
@ -610,7 +610,7 @@ TlsSetVerifyHost (
"%a:%a: parsed \"%a\" as an IPv%c address " "%a:%a: parsed \"%a\" as an IPv%c address "
"literal\n", "literal\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
HostName, HostName,
(UINTN)((BinaryAddressSize == NS_IN6ADDRSZ) ? '6' : '4') (UINTN)((BinaryAddressSize == NS_IN6ADDRSZ) ? '6' : '4')
)); ));

View File

@ -127,7 +127,7 @@ TlsDoHandshake (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n", "%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n",
__FUNCTION__, __func__,
SSL_get_state (TlsConn->Ssl), SSL_get_state (TlsConn->Ssl),
Ret == SSL_ERROR_SSL ? "SSL" : Ret == SSL_ERROR_SYSCALL ? "SYSCALL" : "ZERO_RETURN" Ret == SSL_ERROR_SSL ? "SSL" : Ret == SSL_ERROR_SYSCALL ? "SYSCALL" : "ZERO_RETURN"
)); ));
@ -141,7 +141,7 @@ TlsDoHandshake (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a ERROR 0x%x=L%x:F%x:R%x\n", "%a ERROR 0x%x=L%x:F%x:R%x\n",
__FUNCTION__, __func__,
ErrorCode, ErrorCode,
ERR_GET_LIB (ErrorCode), ERR_GET_LIB (ErrorCode),
ERR_GET_FUNC (ErrorCode), ERR_GET_FUNC (ErrorCode),