RedfishPkg: 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 RedfishPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
This commit is contained in:
committed by
mergify[bot]
parent
ccbbb4b1c5
commit
997419d16f
@@ -28,17 +28,17 @@ ResetHttpTslSession (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __func__));
|
||||
|
||||
Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, NULL);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __func__));
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, &((EFI_REST_EX_HTTP_CONFIG_DATA *)Instance->ConfigData)->HttpConfigData);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __func__));
|
||||
}
|
||||
|
||||
return Status;
|
||||
@@ -70,7 +70,7 @@ RedfishCheckHttpReceiveStatus (
|
||||
ReturnStatus = EFI_SUCCESS;
|
||||
} else if (HttpIoReceiveStatus != EFI_CONNECTION_FIN) {
|
||||
if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) == 0) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __func__));
|
||||
Instance->Flags |= RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY;
|
||||
gBS->Stall (500);
|
||||
Status = ResetHttpTslSession (Instance);
|
||||
@@ -78,20 +78,20 @@ RedfishCheckHttpReceiveStatus (
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));
|
||||
}
|
||||
|
||||
ReturnStatus = EFI_DEVICE_ERROR;
|
||||
} else {
|
||||
if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __func__));
|
||||
ReturnStatus = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY;
|
||||
Status = ResetHttpTslSession (Instance);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));
|
||||
ReturnStatus = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user