]> xenbits.xensource.com Git - ovmf.git/commitdiff
NetworkPkg: Update code to be more C11 compliant by using __func__
authorRebecca Cran <rebecca@bsdio.com>
Thu, 6 Apr 2023 19:53:26 +0000 (13:53 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 10 Apr 2023 14:19:57 +0000 (14:19 +0000)
__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
NetworkPkg.

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>
NetworkPkg/HttpDxe/HttpsSupport.c
NetworkPkg/IScsiDxe/IScsiMisc.c

index ad611e7c383688ab253d862b46fed10c7611309b..7330be42c0063d547655d7fa995fdb41f736ee9d 100644 (file)
@@ -436,7 +436,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: truncated EFI_SIGNATURE_LIST header\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -447,7 +447,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: SignatureListSize too small for EFI_SIGNATURE_LIST\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -456,7 +456,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: truncated EFI_SIGNATURE_LIST body\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -465,7 +465,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: only X509 certificates are supported\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       Status = EFI_UNSUPPORTED;\r
       goto FreeCACert;\r
@@ -475,7 +475,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: SignatureHeaderSize must be 0 for X509\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -484,7 +484,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: SignatureSize too small for EFI_SIGNATURE_DATA\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -495,7 +495,7 @@ TlsConfigCertificate (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: EFI_SIGNATURE_DATA array not a multiple of SignatureSize\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       goto FreeCACert;\r
     }\r
@@ -505,7 +505,7 @@ TlsConfigCertificate (
   }\r
 \r
   if (CertCount == 0) {\r
-    DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __func__));\r
     goto FreeCACert;\r
   }\r
 \r
index b3ea90158f51848776568cbfe2ca849f5efc2d4f..78dc5c73d35a8a32b41489b0181827221144692e 100644 (file)
@@ -875,7 +875,7 @@ IScsiCreateAttempts (
         DEBUG_ERROR,\r
         "%a: Failed to set 'InitialAttemptOrder' with Guid (%g): "\r
         "%r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         &gIScsiConfigGuid,\r
         Status\r
         ));\r
@@ -926,7 +926,7 @@ IScsiCreateAttempts (
         DEBUG_ERROR,\r
         "%a: Failed to set variable (mPrivate->PortString) with Guid (%g): "\r
         "%r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         &gEfiIScsiInitiatorNameProtocolGuid,\r
         Status\r
         ));\r