From 74ce342f1828469fce3221b0b917347cad71f665 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 6 Apr 2023 13:53:10 -0600 Subject: 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 Reviewed-by: Michael D Kinney Reviewed-by: Ard Biesheuvel --- CryptoPkg/Library/TlsLib/TlsConfig.c | 8 ++++---- CryptoPkg/Library/TlsLib/TlsProcess.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'CryptoPkg') diff --git a/CryptoPkg/Library/TlsLib/TlsConfig.c b/CryptoPkg/Library/TlsLib/TlsConfig.c index 60559de..fdda736 100644 --- a/CryptoPkg/Library/TlsLib/TlsConfig.c +++ b/CryptoPkg/Library/TlsLib/TlsConfig.c @@ -331,7 +331,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: skipping CipherId=0x%04x\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, CipherId[Index] )); // @@ -380,7 +380,7 @@ TlsSetCipherList ( DEBUG_ERROR, "%a:%a: no CipherId could be mapped\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); Status = EFI_UNSUPPORTED; goto FreeMappedCipher; @@ -441,7 +441,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: CipherString={\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); for (CipherStringPosition = CipherString; CipherStringPosition < CipherString + FullLength; @@ -610,7 +610,7 @@ TlsSetVerifyHost ( "%a:%a: parsed \"%a\" as an IPv%c address " "literal\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, HostName, (UINTN)((BinaryAddressSize == NS_IN6ADDRSZ) ? '6' : '4') )); diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsLib/TlsProcess.c index a803d86..db29605 100644 --- a/CryptoPkg/Library/TlsLib/TlsProcess.c +++ b/CryptoPkg/Library/TlsLib/TlsProcess.c @@ -127,7 +127,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n", - __FUNCTION__, + __func__, SSL_get_state (TlsConn->Ssl), Ret == SSL_ERROR_SSL ? "SSL" : Ret == SSL_ERROR_SYSCALL ? "SYSCALL" : "ZERO_RETURN" )); @@ -141,7 +141,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a ERROR 0x%x=L%x:F%x:R%x\n", - __FUNCTION__, + __func__, ErrorCode, ERR_GET_LIB (ErrorCode), ERR_GET_FUNC (ErrorCode), -- cgit v1.1