From 6181c85fa98fd1ea9e7292ad5390a2ec4f1da318 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Tue, 3 Feb 2026 13:59:29 -0500 Subject: [PATCH] RedfishPkg: Replace include guards with #pragma once Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki --- RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h | 5 +---- .../Include/IndustryStandard/RedfishHostInterfaceIpmi.h | 5 +---- RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h | 5 +---- RedfishPkg/Include/Library/HiiUtilityLib.h | 5 +---- RedfishPkg/Include/Library/JsonLib.h | 5 +---- RedfishPkg/Include/Library/RedfishContentCodingLib.h | 5 +---- RedfishPkg/Include/Library/RedfishCredentialLib.h | 5 +---- RedfishPkg/Include/Library/RedfishCrtLib.h | 5 +---- RedfishPkg/Include/Library/RedfishDebugLib.h | 5 +---- RedfishPkg/Include/Library/RedfishHostInterfaceLib.h | 5 +---- RedfishPkg/Include/Library/RedfishHttpLib.h | 5 +---- RedfishPkg/Include/Library/RedfishLib.h | 5 +---- RedfishPkg/Include/Library/RedfishPlatformConfigLib.h | 5 +---- RedfishPkg/Include/Library/RedfishPlatformWantedDeviceLib.h | 5 +---- RedfishPkg/Include/Library/RestExLib.h | 5 +---- RedfishPkg/Include/Pcd/RestExServiceDevicePath.h | 5 +---- RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h | 5 +---- RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h | 5 +---- RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h | 5 +---- RedfishPkg/Include/Protocol/EdkIIRedfishHttpProtocol.h | 5 +---- RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h | 5 +---- RedfishPkg/Include/RedfishCommon.h | 5 +---- RedfishPkg/Include/RedfishServiceData.h | 5 +---- RedfishPkg/Library/HiiUtilityLib/HiiExpression.h | 5 +---- RedfishPkg/Library/HiiUtilityLib/HiiInternal.h | 5 +---- RedfishPkg/Library/JsonLib/jansson_config.h | 5 +---- RedfishPkg/Library/JsonLib/jansson_private_config.h | 5 +---- .../PlatformHostInterfaceBmcUsbNicLib.h | 4 +--- .../RedfishPlatformConfigLib/RedfishPlatformConfigInternal.h | 5 +---- .../RedfishPlatformCredentialIpmiLib.h | 5 +---- RedfishPkg/PrivateInclude/Crt/assert.h | 5 +---- RedfishPkg/PrivateInclude/Crt/errno.h | 5 +---- RedfishPkg/PrivateInclude/Crt/limits.h | 5 +---- RedfishPkg/PrivateInclude/Crt/math.h | 5 +---- RedfishPkg/PrivateInclude/Crt/stdarg.h | 5 +---- RedfishPkg/PrivateInclude/Crt/stddef.h | 5 +---- RedfishPkg/PrivateInclude/Crt/stdio.h | 5 +---- RedfishPkg/PrivateInclude/Crt/stdlib.h | 5 +---- RedfishPkg/PrivateInclude/Crt/string.h | 5 +---- RedfishPkg/PrivateInclude/Crt/sys/time.h | 5 +---- RedfishPkg/PrivateInclude/Crt/sys/types.h | 5 +---- RedfishPkg/PrivateInclude/Crt/time.h | 5 +---- RedfishPkg/PrivateLibrary/RedfishLib/RedfishMisc.h | 5 +---- .../RedfishLib/edk2libredfish/include/redfish.h | 5 +---- .../RedfishLib/edk2libredfish/include/redfishPayload.h | 5 +---- .../RedfishLib/edk2libredfish/include/redfishService.h | 5 +---- .../RedfishLib/edk2libredfish/include/redpath.h | 5 +---- RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h | 5 +---- RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h | 5 +---- RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h | 5 +---- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h | 4 +--- RedfishPkg/RedfishHttpDxe/RedfishHttpData.h | 5 +---- RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h | 5 +---- RedfishPkg/RedfishHttpDxe/RedfishHttpOperation.h | 5 +---- .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h | 5 +---- .../RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h | 5 +---- RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h | 5 +---- RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h | 5 +---- RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h | 4 +--- 59 files changed, 59 insertions(+), 233 deletions(-) diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h index d125347cc0..9bddbbda26 100644 --- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h @@ -8,8 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef REDFISH_HOST_INTERFACE_ -#define REDFISH_HOST_INTERFACE_ +#pragma once #include @@ -187,5 +186,3 @@ typedef struct { } REDFISH_OVER_IP_PROTOCOL_DATA; #pragma pack() - -#endif diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h index 9b4a5eb8e3..758d3dd153 100644 --- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h @@ -5,8 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef REDFISH_HOST_INTERFACE_IPMI_H_ -#define REDFISH_HOST_INTERFACE_IPMI_H_ +#pragma once #include #include @@ -47,5 +46,3 @@ typedef struct { } IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE; #pragma pack() - -#endif diff --git a/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h b/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h index 5017043827..6532f3411e 100644 --- a/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h +++ b/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h @@ -8,8 +8,7 @@ **/ -#ifndef BASE_UCS2UTF8_LIB_H_ -#define BASE_UCS2UTF8_LIB_H_ +#pragma once /// /// L"\u0000" @@ -57,5 +56,3 @@ UTF8StrToUCS2 ( IN CHAR8 *Utf8Str, OUT CHAR16 **Ucs2StrAddr ); - -#endif diff --git a/RedfishPkg/Include/Library/HiiUtilityLib.h b/RedfishPkg/Include/Library/HiiUtilityLib.h index 0999ef77fe..456c70f07b 100644 --- a/RedfishPkg/Include/Library/HiiUtilityLib.h +++ b/RedfishPkg/Include/Library/HiiUtilityLib.h @@ -9,8 +9,7 @@ **/ -#ifndef HII_UTILITY_LIB_ -#define HII_UTILITY_LIB_ +#pragma once #include #include @@ -1200,5 +1199,3 @@ EvaluateExpressionList ( IN HII_FORMSET *FormSet OPTIONAL, IN HII_FORM *Form OPTIONAL ); - -#endif // HII_UTILITY_LIB_ diff --git a/RedfishPkg/Include/Library/JsonLib.h b/RedfishPkg/Include/Library/JsonLib.h index ea252291a0..691a8fe61e 100644 --- a/RedfishPkg/Include/Library/JsonLib.h +++ b/RedfishPkg/Include/Library/JsonLib.h @@ -9,8 +9,7 @@ **/ -#ifndef JSON_LIB_H_ -#define JSON_LIB_H_ +#pragma once typedef VOID *EDKII_JSON_VALUE; typedef VOID *EDKII_JSON_ARRAY; @@ -944,5 +943,3 @@ EFIAPI JsonGetType ( IN EDKII_JSON_VALUE JsonValue ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishContentCodingLib.h b/RedfishPkg/Include/Library/RedfishContentCodingLib.h index 137c39aa7d..b53e66574b 100644 --- a/RedfishPkg/Include/Library/RedfishContentCodingLib.h +++ b/RedfishPkg/Include/Library/RedfishContentCodingLib.h @@ -7,8 +7,7 @@ **/ -#ifndef REDFISH_CONTENT_CODING_LIB_H_ -#define REDFISH_CONTENT_CODING_LIB_H_ +#pragma once /** This is the function to encode the content use the @@ -76,5 +75,3 @@ RedfishContentDecode ( OUT VOID **DecodedContentPointer, OUT UINTN *DecodedLength ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishCredentialLib.h b/RedfishPkg/Include/Library/RedfishCredentialLib.h index fafe786513..cd40f0b46d 100644 --- a/RedfishPkg/Include/Library/RedfishCredentialLib.h +++ b/RedfishPkg/Include/Library/RedfishCredentialLib.h @@ -7,8 +7,7 @@ **/ -#ifndef REDFISH_CREDENTIAL_LIB_H_ -#define REDFISH_CREDENTIAL_LIB_H_ +#pragma once #include @@ -89,5 +88,3 @@ LibStopRedfishService ( IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This, IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h b/RedfishPkg/Include/Library/RedfishCrtLib.h index 1e18b978fc..ef2e47b601 100644 --- a/RedfishPkg/Include/Library/RedfishCrtLib.h +++ b/RedfishPkg/Include/Library/RedfishCrtLib.h @@ -8,8 +8,7 @@ **/ -#ifndef REDFISH_CRT_LIB_H_ -#define REDFISH_CRT_LIB_H_ +#pragma once #include #include @@ -405,5 +404,3 @@ time ( extern int errno; #define ERANGE 34 /* 34 Result too large */ - -#endif diff --git a/RedfishPkg/Include/Library/RedfishDebugLib.h b/RedfishPkg/Include/Library/RedfishDebugLib.h index 19e5a895cc..da6cc0f7e0 100644 --- a/RedfishPkg/Include/Library/RedfishDebugLib.h +++ b/RedfishPkg/Include/Library/RedfishDebugLib.h @@ -8,8 +8,7 @@ **/ -#ifndef REDFISH_DEBUG_LIB_H_ -#define REDFISH_DEBUG_LIB_H_ +#pragma once #include #include @@ -176,5 +175,3 @@ DumpBuffer ( IN UINT8 *Buffer, IN UINTN BufferSize ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h index 4b13282727..b0c1476f56 100644 --- a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h +++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h @@ -9,8 +9,7 @@ **/ -#ifndef REDFISH_HOST_INTERFACE_LIB_H_ -#define REDFISH_HOST_INTERFACE_LIB_H_ +#pragma once #include #include @@ -87,5 +86,3 @@ EFI_STATUS RedfishPlatformHostInterfaceSerialNumber ( OUT CHAR8 **SerialNumber ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishHttpLib.h b/RedfishPkg/Include/Library/RedfishHttpLib.h index 39b2098139..456223e9d6 100644 --- a/RedfishPkg/Include/Library/RedfishHttpLib.h +++ b/RedfishPkg/Include/Library/RedfishHttpLib.h @@ -7,8 +7,7 @@ **/ -#ifndef REDFISH_HTTP_LIB_H_ -#define REDFISH_HTTP_LIB_H_ +#pragma once #include @@ -322,5 +321,3 @@ RedfishHttpDeleteResourceEx ( IN CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *Response ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishLib.h b/RedfishPkg/Include/Library/RedfishLib.h index fb30ff68f6..5b24fadf79 100644 --- a/RedfishPkg/Include/Library/RedfishLib.h +++ b/RedfishPkg/Include/Library/RedfishLib.h @@ -67,8 +67,7 @@ **/ -#ifndef REDFISH_LIB_H_ -#define REDFISH_LIB_H_ +#pragma once #include #include @@ -736,5 +735,3 @@ RedfishBuildRedpathUseId ( IN CHAR8 *Id, OUT CHAR8 **Redpath ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishPlatformConfigLib.h b/RedfishPkg/Include/Library/RedfishPlatformConfigLib.h index 98e62b8f7c..9eb99f3049 100644 --- a/RedfishPkg/Include/Library/RedfishPlatformConfigLib.h +++ b/RedfishPkg/Include/Library/RedfishPlatformConfigLib.h @@ -8,8 +8,7 @@ **/ -#ifndef REDFISH_PLATFORM_CONFIG_LIB_H_ -#define REDFISH_PLATFORM_CONFIG_LIB_H_ +#pragma once #include @@ -139,5 +138,3 @@ RedfishPlatformConfigGetDefaultValue ( IN UINT16 DefaultClass, OUT EDKII_REDFISH_VALUE *Value ); - -#endif diff --git a/RedfishPkg/Include/Library/RedfishPlatformWantedDeviceLib.h b/RedfishPkg/Include/Library/RedfishPlatformWantedDeviceLib.h index 31d4c93886..aceac32af0 100644 --- a/RedfishPkg/Include/Library/RedfishPlatformWantedDeviceLib.h +++ b/RedfishPkg/Include/Library/RedfishPlatformWantedDeviceLib.h @@ -7,8 +7,7 @@ **/ -#ifndef REDFISH_PLATFORM_WANTED_DEVICE_LIB_H_ -#define REDFISH_PLATFORM_WANTED_DEVICE_LIB_H_ +#pragma once #include @@ -33,5 +32,3 @@ IsPlatformWantedDevice ( IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL ); - -#endif diff --git a/RedfishPkg/Include/Library/RestExLib.h b/RedfishPkg/Include/Library/RestExLib.h index 2c32c3684c..abad1646ec 100644 --- a/RedfishPkg/Include/Library/RestExLib.h +++ b/RedfishPkg/Include/Library/RestExLib.h @@ -8,8 +8,7 @@ **/ -#ifndef REST_EX_LIB_H_ -#define REST_EX_LIB_H_ +#pragma once #include @@ -41,5 +40,3 @@ RestExLibCreateChild ( IN EFI_REST_EX_SERVICE_TYPE ServiceType, OUT EFI_HANDLE *ChildInstanceHandle ); - -#endif diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h index b630c1e7f5..8562f6633f 100644 --- a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h +++ b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h @@ -10,8 +10,7 @@ **/ -#ifndef REST_EX_SERVICE_DEVICE_PATH_H_ -#define REST_EX_SERVICE_DEVICE_PATH_H_ +#pragma once #include @@ -37,5 +36,3 @@ typedef struct { // EFI_DEVICE_PATH_PROTOCOL DevicePath[MAX_DEVICE_PATH_NODE]; } REST_EX_SERVICE_DEVICE_PATH_DATA; - -#endif diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h b/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h index 6604322865..fa17149a88 100644 --- a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h @@ -8,8 +8,7 @@ **/ -#ifndef EDKII_REDFISH_CONFIG_HANDLER_H_ -#define EDKII_REDFISH_CONFIG_HANDLER_H_ +#pragma once typedef struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL; @@ -73,5 +72,3 @@ struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL { }; extern EFI_GUID gdkIIRedfishConfigHandlerProtocolGuid; - -#endif diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h index 6aaf9fcde9..77f014643e 100644 --- a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h @@ -8,8 +8,7 @@ **/ -#ifndef EDKII_REDFISH_CREDENTIAL_H_ -#define EDKII_REDFISH_CREDENTIAL_H_ +#pragma once typedef struct _EDKII_REDFISH_CREDENTIAL_PROTOCOL EDKII_REDFISH_CREDENTIAL_PROTOCOL; @@ -96,5 +95,3 @@ struct _EDKII_REDFISH_CREDENTIAL_PROTOCOL { }; extern EFI_GUID gEdkIIRedfishCredentialProtocolGuid; - -#endif diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h index b2b3799bd1..b1d624bc2d 100644 --- a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h @@ -9,8 +9,7 @@ **/ -#ifndef EDKII_REDFISH_CREDENTIAL2_H_ -#define EDKII_REDFISH_CREDENTIAL2_H_ +#pragma once #include #include @@ -124,5 +123,3 @@ struct _EDKII_REDFISH_CREDENTIAL2_PROTOCOL { }; extern EFI_GUID gEdkIIRedfishCredential2ProtocolGuid; - -#endif diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishHttpProtocol.h b/RedfishPkg/Include/Protocol/EdkIIRedfishHttpProtocol.h index 59f1f865fc..645e0d74f6 100644 --- a/RedfishPkg/Include/Protocol/EdkIIRedfishHttpProtocol.h +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishHttpProtocol.h @@ -7,8 +7,7 @@ **/ -#ifndef EDKII_REDFISH_HTTP_PROTOCOL_H_ -#define EDKII_REDFISH_HTTP_PROTOCOL_H_ +#pragma once #include #include @@ -304,5 +303,3 @@ struct _EDKII_REDFISH_HTTP_PROTOCOL { #define EDKII_REDFISH_HTTP_PROTOCOL_REVISION 0x00001000 extern EFI_GUID gEdkIIRedfishHttpProtocolGuid; - -#endif diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h index c96d198867..33c7580ec1 100644 --- a/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h @@ -8,8 +8,7 @@ **/ -#ifndef EDKII_REDFISH_PLATFORM_CONFIG_H_ -#define EDKII_REDFISH_PLATFORM_CONFIG_H_ +#pragma once typedef struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL; @@ -260,5 +259,3 @@ struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL { }; extern EFI_GUID gEdkIIRedfishPlatformConfigProtocolGuid; - -#endif diff --git a/RedfishPkg/Include/RedfishCommon.h b/RedfishPkg/Include/RedfishCommon.h index 18244e9855..f19a24c2db 100644 --- a/RedfishPkg/Include/RedfishCommon.h +++ b/RedfishPkg/Include/RedfishCommon.h @@ -7,11 +7,8 @@ **/ -#ifndef REDFISH_COMMON_H_ -#define REDFISH_COMMON_H_ +#pragma once #ifndef IS_EMPTY_STRING #define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0') #endif - -#endif diff --git a/RedfishPkg/Include/RedfishServiceData.h b/RedfishPkg/Include/RedfishServiceData.h index bcaa12ba27..108519b65c 100644 --- a/RedfishPkg/Include/RedfishServiceData.h +++ b/RedfishPkg/Include/RedfishServiceData.h @@ -10,8 +10,7 @@ **/ -#ifndef REDFISH_SERVICE_DATA_H_ -#define REDFISH_SERVICE_DATA_H_ +#pragma once #include #include @@ -39,5 +38,3 @@ typedef struct { EFI_HTTP_HEADER *Headers; REDFISH_PAYLOAD Payload; } REDFISH_RESPONSE; - -#endif diff --git a/RedfishPkg/Library/HiiUtilityLib/HiiExpression.h b/RedfishPkg/Library/HiiUtilityLib/HiiExpression.h index dda96ada60..1633bbf157 100644 --- a/RedfishPkg/Library/HiiUtilityLib/HiiExpression.h +++ b/RedfishPkg/Library/HiiUtilityLib/HiiExpression.h @@ -9,8 +9,7 @@ **/ -#ifndef HII_EXPRESSION_H_ -#define HII_EXPRESSION_H_ +#pragma once #include @@ -187,5 +186,3 @@ EFI_STATUS PopScope ( OUT UINT8 *Operand ); - -#endif diff --git a/RedfishPkg/Library/HiiUtilityLib/HiiInternal.h b/RedfishPkg/Library/HiiUtilityLib/HiiInternal.h index e68a61f8b2..ee27135ae3 100644 --- a/RedfishPkg/Library/HiiUtilityLib/HiiInternal.h +++ b/RedfishPkg/Library/HiiUtilityLib/HiiInternal.h @@ -9,8 +9,7 @@ **/ -#ifndef HII_INTERNAL_H_ -#define HII_INTERNAL_H_ +#pragma once #include @@ -372,5 +371,3 @@ EFI_STATUS ParseOpCodes ( IN HII_FORMSET *FormSet ); - -#endif // HII_INTERNAL_H_ diff --git a/RedfishPkg/Library/JsonLib/jansson_config.h b/RedfishPkg/Library/JsonLib/jansson_config.h index 2cde2cf0e0..ec9b50fb40 100644 --- a/RedfishPkg/Library/JsonLib/jansson_config.h +++ b/RedfishPkg/Library/JsonLib/jansson_config.h @@ -5,8 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef JANSSON_CONFIG_H_ -#define JANSSON_CONFIG_H_ +#pragma once /// /// We don't support inline JSON on edk2 @@ -37,5 +36,3 @@ /// Mzximum deepth is set to 2048 /// #define JSON_PARSER_MAX_DEPTH 2048 - -#endif diff --git a/RedfishPkg/Library/JsonLib/jansson_private_config.h b/RedfishPkg/Library/JsonLib/jansson_private_config.h index 03a80571ab..101277296e 100644 --- a/RedfishPkg/Library/JsonLib/jansson_private_config.h +++ b/RedfishPkg/Library/JsonLib/jansson_private_config.h @@ -8,12 +8,9 @@ **/ -#ifndef JANSSON_PRIVATE_CONFIG_H_ -#define JANSSON_PRIVATE_CONFIG_H_ +#pragma once #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TYPES_H 1 #define INITIAL_HASHTABLE_ORDER 3 - -#endif diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.h b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.h index 96b2bdfbe7..7f0e23f910 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.h +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.h @@ -8,8 +8,7 @@ **/ -#ifndef PLATFORM_HOST_INTERFACE_BMC_USB_NIC_LIB_H_ -#define PLATFORM_HOST_INTERFACE_BMC_USB_NIC_LIB_H_ +#pragma once #include #include @@ -81,4 +80,3 @@ typedef struct { EFI_MAC_ADDRESS MacAddress; ///< IPMI LAN Channel MAC address. UINT8 MacAddressSize; ///< MAC address size; } BMC_IPMI_LAN_CHANNEL_INFO; -#endif diff --git a/RedfishPkg/Library/RedfishPlatformConfigLib/RedfishPlatformConfigInternal.h b/RedfishPkg/Library/RedfishPlatformConfigLib/RedfishPlatformConfigInternal.h index 061e7f4a45..3e2d900c13 100644 --- a/RedfishPkg/Library/RedfishPlatformConfigLib/RedfishPlatformConfigInternal.h +++ b/RedfishPkg/Library/RedfishPlatformConfigLib/RedfishPlatformConfigInternal.h @@ -8,8 +8,7 @@ **/ -#ifndef REDFISH_PLATFORM_CONFIG_H_ -#define REDFISH_PLATFORM_CONFIG_H_ +#pragma once #include @@ -31,5 +30,3 @@ typedef struct { VOID *Registration; ///< Protocol notification registration. EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *Protocol; } REDFISH_PLATFORM_CONFIG_LIB_PRIVATE; - -#endif diff --git a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.h b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.h index 898ee88844..1731c79b2d 100644 --- a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.h +++ b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.h @@ -7,8 +7,7 @@ **/ -#ifndef REDFISH_PLATFORM_CREDENTIAL_IPMI_LIB_H_ -#define REDFISH_PLATFORM_CREDENTIAL_IPMI_LIB_H_ +#pragma once #include #include @@ -85,5 +84,3 @@ SetBootstrapAccountCredentialsToVariable ( IN CHAR8 *BootstrapPassword, OPTIONAL IN BOOLEAN DeleteVariable ); - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/assert.h b/RedfishPkg/PrivateInclude/Crt/assert.h index 9dc71e81cd..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/assert.h +++ b/RedfishPkg/PrivateInclude/Crt/assert.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_ASSERT_H_ -#define REDFISH_CRT_ASSERT_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/errno.h b/RedfishPkg/PrivateInclude/Crt/errno.h index b9c00ac6d8..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/errno.h +++ b/RedfishPkg/PrivateInclude/Crt/errno.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_ERRNO_H_ -#define REDFISH_CRT_ERRNO_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/limits.h b/RedfishPkg/PrivateInclude/Crt/limits.h index f665234dba..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/limits.h +++ b/RedfishPkg/PrivateInclude/Crt/limits.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_LIMITS_H_ -#define REDFISH_CRT_LIMITS_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/math.h b/RedfishPkg/PrivateInclude/Crt/math.h index 6e36bfb642..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/math.h +++ b/RedfishPkg/PrivateInclude/Crt/math.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_MATH_H_ -#define REDFISH_CRT_MATH_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/stdarg.h b/RedfishPkg/PrivateInclude/Crt/stdarg.h index c94527f7a7..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/stdarg.h +++ b/RedfishPkg/PrivateInclude/Crt/stdarg.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_STDARG_H_ -#define REDFISH_CRT_STDARG_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/stddef.h b/RedfishPkg/PrivateInclude/Crt/stddef.h index 86af6f8340..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/stddef.h +++ b/RedfishPkg/PrivateInclude/Crt/stddef.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_STDDEF_H_ -#define REDFISH_CRT_STDDEF_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/stdio.h b/RedfishPkg/PrivateInclude/Crt/stdio.h index 10c8e4d11d..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/stdio.h +++ b/RedfishPkg/PrivateInclude/Crt/stdio.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_STDIO_H_ -#define REDFISH_CRT_STDIO_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/stdlib.h b/RedfishPkg/PrivateInclude/Crt/stdlib.h index b4c455ba3e..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/stdlib.h +++ b/RedfishPkg/PrivateInclude/Crt/stdlib.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_STDLIB_H_ -#define REDFISH_CRT_STDLIB_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/string.h b/RedfishPkg/PrivateInclude/Crt/string.h index 1def1ec1f0..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/string.h +++ b/RedfishPkg/PrivateInclude/Crt/string.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_STRING_H_ -#define REDFISH_CRT_STRING_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/sys/time.h b/RedfishPkg/PrivateInclude/Crt/sys/time.h index f3000f2303..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/sys/time.h +++ b/RedfishPkg/PrivateInclude/Crt/sys/time.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_SYS_TIME_H_ -#define REDFISH_CRT_SYS_TIME_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/sys/types.h b/RedfishPkg/PrivateInclude/Crt/sys/types.h index 1d9816c7e3..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/sys/types.h +++ b/RedfishPkg/PrivateInclude/Crt/sys/types.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_SYS_TYPES_H_ -#define REDFISH_CRT_SYS_TYPES_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateInclude/Crt/time.h b/RedfishPkg/PrivateInclude/Crt/time.h index ef15cc3bd3..013d939d12 100644 --- a/RedfishPkg/PrivateInclude/Crt/time.h +++ b/RedfishPkg/PrivateInclude/Crt/time.h @@ -8,9 +8,6 @@ **/ -#ifndef REDFISH_CRT_TIME_H_ -#define REDFISH_CRT_TIME_H_ +#pragma once #include - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishMisc.h b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishMisc.h index 3b066c1172..54c2c906de 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishMisc.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishMisc.h @@ -8,8 +8,7 @@ **/ -#ifndef DXE_REDFISH_MISC_LIB_H_ -#define DXE_REDFISH_MISC_LIB_H_ +#pragma once #include #include @@ -78,5 +77,3 @@ RedfishGetAuthInfo ( OUT CHAR8 **UserId, OUT CHAR8 **Password ); - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfish.h b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfish.h index e9b9b3fa55..4bd0d766c4 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfish.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfish.h @@ -15,11 +15,8 @@ **/ -#ifndef LIBREDFISH_REDFISH_H_ -#define LIBREDFISH_REDFISH_H_ +#pragma once #include #include #include - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishPayload.h b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishPayload.h index 25bd0b5481..a655bb04aa 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishPayload.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishPayload.h @@ -16,8 +16,7 @@ **/ -#ifndef LIBREDFISH_REDFISH_PAYLOAD_H_ -#define LIBREDFISH_REDFISH_PAYLOAD_H_ +#pragma once #include #include @@ -103,5 +102,3 @@ getPayloadByIndex ( size_t index, EFI_HTTP_STATUS_CODE **StatusCode ); - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishService.h b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishService.h index 30f839ea2e..4b13e87ebf 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishService.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishService.h @@ -16,8 +16,7 @@ **/ -#ifndef LIBREDFISH_REDFISH_SERVICE_H_ -#define LIBREDFISH_REDFISH_SERVICE_H_ +#pragma once #include @@ -199,5 +198,3 @@ void cleanupServiceEnumerator ( redfishService *service ); - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redpath.h b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redpath.h index c1a1568bf0..e2b25b9e98 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redpath.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redpath.h @@ -15,8 +15,7 @@ **/ -#ifndef LIBREDFISH_REDPATH_H_ -#define LIBREDFISH_REDPATH_H_ +#pragma once #include @@ -45,5 +44,3 @@ void cleanupRedPath ( redPathNode *node ); - -#endif diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h index 460b3d915c..203b394361 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.h @@ -8,8 +8,7 @@ **/ -#ifndef EFI_REDFISH_CONFIG_HANDLER_COMMON_H_ -#define EFI_REDFISH_CONFIG_HANDLER_COMMON_H_ +#pragma once #include @@ -97,5 +96,3 @@ VOID RedfishConfigHandlerInitialization ( VOID ); - -#endif diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h index 51701c05c6..9c7f17cfcd 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.h @@ -8,8 +8,7 @@ **/ -#ifndef EFI_REDFISH_CONFIG_HANDLER_DRIVER_H_ -#define EFI_REDFISH_CONFIG_HANDLER_DRIVER_H_ +#pragma once #include "RedfishConfigHandlerCommon.h" @@ -158,5 +157,3 @@ RedfishConfigDriverBindingStop ( IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL ); - -#endif diff --git a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h index 271f884ec9..b4daa9ea09 100644 --- a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h +++ b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h @@ -9,8 +9,7 @@ **/ -#ifndef EDKII_REDFISH_CREDENTIAL_DXE_H_ -#define EDKII_REDFISH_CREDENTIAL_DXE_H_ +#pragma once #include #include @@ -52,5 +51,3 @@ typedef struct { EDKII_REDFISH_CREDENTIAL2_PROTOCOL RedfishCredential2Protocol; LIST_ENTRY RedfishServiceList; } REDFISH_CREDENTIAL_PRIVATE; - -#endif diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h index de7faa4f97..c475bc91ed 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h @@ -9,8 +9,7 @@ **/ -#ifndef EFI_REDFISH_DISCOVER_INTERNAL_H_ -#define EFI_REDFISH_DISCOVER_INTERNAL_H_ +#pragma once #include @@ -263,4 +262,3 @@ RedfishGetHostInterfaceProtocolData ( extern EFI_GUID gRedfishDiscoverTcp4Instance; extern EFI_GUID gRedfishDiscoverTcp6Instance; extern EFI_GUID gRedfishDiscoverRestEXInstance; -#endif diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpData.h b/RedfishPkg/RedfishHttpDxe/RedfishHttpData.h index 700c74c931..5c69121a31 100644 --- a/RedfishPkg/RedfishHttpDxe/RedfishHttpData.h +++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpData.h @@ -8,8 +8,7 @@ **/ -#ifndef EDKII_REDFISH_HTTP_DATA_H_ -#define EDKII_REDFISH_HTTP_DATA_H_ +#pragma once #include "RedfishHttpDxe.h" @@ -253,5 +252,3 @@ UpdateSessionToken ( IN REDFISH_SERVICE_PRIVATE *Service, IN CHAR8 *Token ); - -#endif diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h index 38c3cd24a4..a0d6acecba 100644 --- a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h +++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h @@ -7,8 +7,7 @@ **/ -#ifndef EDKII_REDFISH_HTTP_DXE_H_ -#define EDKII_REDFISH_HTTP_DXE_H_ +#pragma once #include #include @@ -40,5 +39,3 @@ #define REDFISH_HTTP_CACHE_DEBUG DEBUG_MANAGEABILITY #define REDFISH_HTTP_CACHE_DEBUG_DUMP DEBUG_MANAGEABILITY #define REDFISH_HTTP_CACHE_DEBUG_REQUEST DEBUG_MANAGEABILITY - -#endif diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpOperation.h b/RedfishPkg/RedfishHttpDxe/RedfishHttpOperation.h index 79954744ad..3a83c57a9f 100644 --- a/RedfishPkg/RedfishHttpDxe/RedfishHttpOperation.h +++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpOperation.h @@ -7,8 +7,7 @@ **/ -#ifndef EDKII_REDFISH_HTTP_OPERATION_H_ -#define EDKII_REDFISH_HTTP_OPERATION_H_ +#pragma once #include "RedfishHttpDxe.h" @@ -73,5 +72,3 @@ HttpSendReceive ( IN REDFISH_REQUEST *Request OPTIONAL, OUT REDFISH_RESPONSE *Response ); - -#endif diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h index 6f491b2c2e..9b4a312e7e 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h @@ -9,8 +9,7 @@ **/ -#ifndef EDKII_REDFISH_PLATFORM_CONFIG_DXE_H_ -#define EDKII_REDFISH_PLATFORM_CONFIG_DXE_H_ +#pragma once #include @@ -131,5 +130,3 @@ CHAR8 * StrToAsciiStr ( IN EFI_STRING UnicodeString ); - -#endif diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h index 9ac7f26857..1044fb89bb 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h @@ -9,8 +9,7 @@ **/ -#ifndef EDKII_REDFISH_PLATFORM_CONFIG_IMPL_H_ -#define EDKII_REDFISH_PLATFORM_CONFIG_IMPL_H_ +#pragma once #include #include @@ -445,5 +444,3 @@ BOOLEAN RedfishPlatformConfigFeatureProp ( IN UINT64 FeatureProp ); - -#endif diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h index 2f081cd912..11f562d127 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h @@ -11,8 +11,7 @@ **/ -#ifndef EFI_REDFISH_RESTEX_DRIVER_H_ -#define EFI_REDFISH_RESTEX_DRIVER_H_ +#pragma once /// /// Libraries classes @@ -660,5 +659,3 @@ RedfishRestExServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle ); - -#endif diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h b/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h index c146f4a647..81b1a03382 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExInternal.h @@ -9,8 +9,7 @@ **/ -#ifndef EFI_REDFISH_RESTEX_INTERNAL_H_ -#define EFI_REDFISH_RESTEX_INTERNAL_H_ +#pragma once /// /// Libraries classes @@ -623,5 +622,3 @@ RedfishRestExServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle ); - -#endif diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h index 04be5cc80b..6f5b406065 100644 --- a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h +++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h @@ -9,8 +9,7 @@ **/ -#ifndef EFI_REST_JSON_STRUCTURE_INTERNAL_H_ -#define EFI_REST_JSON_STRUCTURE_INTERNAL_H_ +#pragma once #include #include @@ -31,4 +30,3 @@ typedef struct _REST_JSON_STRUCTURE_INSTANCE { EFI_REST_JSON_STRUCTURE_TO_JSON StructureToJson; ///< C structure to JSON function EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure; ///< Destory C struture function. } REST_JSON_STRUCTURE_INSTANCE; -#endif