UnitTestFrameworkPkg: Update 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
UnitTestFrameworkPkg.

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:51:51 -06:00
committed by mergify[bot]
parent f20e35982b
commit 1295e37d4b
7 changed files with 25 additions and 25 deletions

View File

@ -61,7 +61,7 @@ SetBootNextDevice (
DpEnd = AppendDevicePathNode (NULL, NULL);
if (DpEnd == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL.\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL.\n", __func__));
Status = EFI_OUT_OF_RESOURCES;
goto CLEANUP;
}
@ -72,7 +72,7 @@ SetBootNextDevice (
(EFI_DEVICE_PATH_PROTOCOL *)&UsbDp
);
if (Dp == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n", __func__));
Status = EFI_OUT_OF_RESOURCES;
goto CLEANUP;
}
@ -88,15 +88,15 @@ SetBootNextDevice (
OptionalDataSize
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status = %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status = %r\n", __func__, Status));
goto CLEANUP;
}
NewOptionValid = TRUE;
DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created.\n", __FUNCTION__));
DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created.\n", __func__));
Status = EfiBootManagerLoadOptionToVariable (&NewOption);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status = %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status = %r\n", __func__, Status));
goto CLEANUP;
}
@ -111,7 +111,7 @@ SetBootNextDevice (
&(BootNextValue)
);
DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __FUNCTION__, Status));
DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __func__, Status));
CLEANUP:
if (Dp != NULL) {