diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/Library/BaseCryptLib.h index 919ee70924..a3759ecb0c 100644 --- a/CryptoPkg/Include/Library/BaseCryptLib.h +++ b/CryptoPkg/Include/Library/BaseCryptLib.h @@ -10,8 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __BASE_CRYPT_LIB_H__ -#define __BASE_CRYPT_LIB_H__ +#pragma once #include @@ -4302,5 +4301,3 @@ EcDsaVerify ( IN CONST UINT8 *Signature, IN UINTN SigSize ); - -#endif // __BASE_CRYPT_LIB_H__ diff --git a/CryptoPkg/Include/Library/HashApiLib.h b/CryptoPkg/Include/Library/HashApiLib.h index c2b88bd785..a19db28cd5 100644 --- a/CryptoPkg/Include/Library/HashApiLib.h +++ b/CryptoPkg/Include/Library/HashApiLib.h @@ -9,8 +9,7 @@ **/ -#ifndef __HASH_API_LIB_H_ -#define __HASH_API_LIB_H_ +#pragma once typedef VOID *HASH_API_CONTEXT; @@ -106,5 +105,3 @@ HashApiHashAll ( IN UINTN DataToHashLen, OUT UINT8 *Digest ); - -#endif diff --git a/CryptoPkg/Include/Library/TlsLib.h b/CryptoPkg/Include/Library/TlsLib.h index abacbe7fc9..cc45fe3e50 100644 --- a/CryptoPkg/Include/Library/TlsLib.h +++ b/CryptoPkg/Include/Library/TlsLib.h @@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __TLS_LIB_H__ -#define __TLS_LIB_H__ +#pragma once /** Initializes the OpenSSL library. @@ -968,5 +967,3 @@ TlsGetExportKey ( OUT VOID *KeyBuffer, IN UINTN KeyBufferLen ); - -#endif // __TLS_LIB_H__ diff --git a/CryptoPkg/Include/Pcd/PcdCryptoServiceFamilyEnable.h b/CryptoPkg/Include/Pcd/PcdCryptoServiceFamilyEnable.h index 5e9287188c..b5b52b408c 100644 --- a/CryptoPkg/Include/Pcd/PcdCryptoServiceFamilyEnable.h +++ b/CryptoPkg/Include/Pcd/PcdCryptoServiceFamilyEnable.h @@ -28,8 +28,7 @@ **/ -#ifndef __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__ -#define __PCD_CRYPTO_SERVICE_FAMILY_ENABLE_H__ +#pragma once /// /// Define used to enable all the crypto services in a family @@ -431,5 +430,3 @@ typedef struct { UINT32 Family; } Ec; } PCD_CRYPTO_SERVICE_FAMILY_ENABLE; - -#endif diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h b/CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h index e712ef36f7..246e2e0146 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h +++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h @@ -21,8 +21,7 @@ and related or neighboring rights to the source code in this file. http://creativecommons.org/publicdomain/zero/1.0/ **/ -#ifndef CRYPT_PARALLEL_HASH_H_ -#define CRYPT_PARALLEL_HASH_H_ +#pragma once #include "InternalCryptLib.h" @@ -228,5 +227,3 @@ EFIAPI DispatchBlockToAp ( VOID ); - -#endif // CRYPT_PARALLEL_HASH_H_ diff --git a/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h b/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h index 477e3ae5f1..24e5b2d97e 100644 --- a/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h +++ b/CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h @@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __INTERNAL_CRYPT_LIB_H__ -#define __INTERNAL_CRYPT_LIB_H__ +#pragma once #undef _WIN32 #undef _WIN64 @@ -60,5 +59,3 @@ WrapPkcs7Data ( OUT UINT8 **WrapData, OUT UINTN *WrapDataSize ); - -#endif diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h b/CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h index d3fa5ffc89..dcfa93ae58 100644 --- a/CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/InternalCryptLib.h @@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef INTERNAL_CRYPT_LIB_H_ -#define INTERNAL_CRYPT_LIB_H_ +#pragma once #include #include @@ -70,5 +69,3 @@ WrapPkcs7Data ( OUT UINT8 **WrapData, OUT UINTN *WrapDataSize ); - -#endif diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Internal.h b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Internal.h index 3f2cab37d2..b6d4aa0cfa 100644 --- a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Internal.h +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Internal.h @@ -9,8 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef CRYPT_PKCS7_INTERNAL_H_ -#define CRYPT_PKCS7_INTERNAL_H_ +#pragma once #include "InternalCryptLib.h" @@ -85,5 +84,3 @@ typedef struct MbedtlsPkcs7 { else \ (g) += Ret; \ } while( 0 ) - -#endif diff --git a/CryptoPkg/Library/BaseCryptLibNull/InternalCryptLib.h b/CryptoPkg/Library/BaseCryptLibNull/InternalCryptLib.h index 96958592e1..4b3779e45d 100644 --- a/CryptoPkg/Library/BaseCryptLibNull/InternalCryptLib.h +++ b/CryptoPkg/Library/BaseCryptLibNull/InternalCryptLib.h @@ -6,11 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __INTERNAL_CRYPT_LIB_H__ -#define __INTERNAL_CRYPT_LIB_H__ +#pragma once #include #include #include - -#endif diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index 613d418493..d7b104eac6 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -9,8 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __CRT_LIB_SUPPORT_H__ -#define __CRT_LIB_SUPPORT_H__ +#pragma once #include #include @@ -485,4 +484,3 @@ strpbrk ( #else #define UINTPTR_MAX 0xFFFFFFFFUL #endif -#endif diff --git a/CryptoPkg/Library/Include/stdint.h b/CryptoPkg/Library/Include/stdint.h index 004c31b70f..63922f3565 100644 --- a/CryptoPkg/Library/Include/stdint.h +++ b/CryptoPkg/Library/Include/stdint.h @@ -6,8 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef CRYPTO_CRT_STDIO_H_ -#define CRYPTO_CRT_STDIO_H_ +#pragma once + #include // @@ -24,5 +24,3 @@ typedef INT64 int64_t; typedef UINT64 uint64_t; typedef UINTN uintptr_t; #endif - -#endif diff --git a/CryptoPkg/Library/TlsLib/InternalTlsLib.h b/CryptoPkg/Library/TlsLib/InternalTlsLib.h index bdc41325d4..d43fbc3203 100644 --- a/CryptoPkg/Library/TlsLib/InternalTlsLib.h +++ b/CryptoPkg/Library/TlsLib/InternalTlsLib.h @@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __INTERNAL_TLS_LIB_H__ -#define __INTERNAL_TLS_LIB_H__ +#pragma once #undef _WIN32 #undef _WIN64 @@ -56,5 +55,3 @@ typedef struct { BIO *BioDebug; INT32 Ack; } TLS_EXT_CTX; - -#endif diff --git a/CryptoPkg/Library/TlsLibNull/InternalTlsLib.h b/CryptoPkg/Library/TlsLibNull/InternalTlsLib.h index 888c9066bf..92605ba8e1 100644 --- a/CryptoPkg/Library/TlsLibNull/InternalTlsLib.h +++ b/CryptoPkg/Library/TlsLibNull/InternalTlsLib.h @@ -6,11 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __INTERNAL_TLS_LIB_NULL_H__ -#define __INTERNAL_TLS_LIB_NULL_H__ +#pragma once #include #include #include - -#endif diff --git a/CryptoPkg/Private/Library/IntrinsicLib.h b/CryptoPkg/Private/Library/IntrinsicLib.h index 69172a0419..1c0cd4f29e 100644 --- a/CryptoPkg/Private/Library/IntrinsicLib.h +++ b/CryptoPkg/Private/Library/IntrinsicLib.h @@ -6,11 +6,8 @@ **/ -#ifndef INTRINSTIC_LIB_H_ -#define INTRINSTIC_LIB_H_ +#pragma once // // Compiler dependent intrinsic APIs. // - -#endif diff --git a/CryptoPkg/Private/Library/MbedTlsLib.h b/CryptoPkg/Private/Library/MbedTlsLib.h index 30517a76d3..d1d4c65fc1 100644 --- a/CryptoPkg/Private/Library/MbedTlsLib.h +++ b/CryptoPkg/Private/Library/MbedTlsLib.h @@ -6,7 +6,4 @@ **/ -#ifndef MBEDTLS_LIB_H_ -#define MBEDTLS_LIB_H_ - -#endif +#pragma once diff --git a/CryptoPkg/Private/Library/OpensslLib.h b/CryptoPkg/Private/Library/OpensslLib.h index 005eb84872..aa2000edcd 100644 --- a/CryptoPkg/Private/Library/OpensslLib.h +++ b/CryptoPkg/Private/Library/OpensslLib.h @@ -6,9 +6,6 @@ **/ -#ifndef OPENSSL_LIB_H_ -#define OPENSSL_LIB_H_ +#pragma once #include - -#endif diff --git a/CryptoPkg/Private/Ppi/Crypto.h b/CryptoPkg/Private/Ppi/Crypto.h index ad5a524644..e18da41c81 100644 --- a/CryptoPkg/Private/Ppi/Crypto.h +++ b/CryptoPkg/Private/Ppi/Crypto.h @@ -6,8 +6,7 @@ **/ -#ifndef __EDKII_CRYPTO_PPI_H__ -#define __EDKII_CRYPTO_PPI_H__ +#pragma once #include @@ -17,5 +16,3 @@ typedef EDKII_CRYPTO_PROTOCOL EDKII_CRYPTO_PPI; extern GUID gEdkiiCryptoPpiGuid; - -#endif diff --git a/CryptoPkg/Private/Protocol/Crypto.h b/CryptoPkg/Private/Protocol/Crypto.h index 7d3ff548d6..b9f603bbe7 100644 --- a/CryptoPkg/Private/Protocol/Crypto.h +++ b/CryptoPkg/Private/Protocol/Crypto.h @@ -7,8 +7,7 @@ **/ -#ifndef __EDKII_CRYPTO_PROTOCOL_H__ -#define __EDKII_CRYPTO_PROTOCOL_H__ +#pragma once #include #include @@ -5754,5 +5753,3 @@ struct _EDKII_CRYPTO_PROTOCOL { }; extern GUID gEdkiiCryptoProtocolGuid; - -#endif diff --git a/CryptoPkg/Private/Protocol/SmmCrypto.h b/CryptoPkg/Private/Protocol/SmmCrypto.h index fec5a45523..7e69646b01 100644 --- a/CryptoPkg/Private/Protocol/SmmCrypto.h +++ b/CryptoPkg/Private/Protocol/SmmCrypto.h @@ -6,8 +6,7 @@ **/ -#ifndef __EDKII_SMM_CRYPTO_PROTOCOL_H__ -#define __EDKII_SMM_CRYPTO_PROTOCOL_H__ +#pragma once #include @@ -17,5 +16,3 @@ typedef EDKII_CRYPTO_PROTOCOL EDKII_SMM_CRYPTO_PROTOCOL; extern GUID gEdkiiSmmCryptoProtocolGuid; - -#endif diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h index 01e25e83a0..1b079c6546 100644 --- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h +++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h @@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#ifndef __CRYPTEST_H__ -#define __CRYPTEST_H__ +#pragma once #include #include @@ -168,5 +167,3 @@ EFIAPI UefiTestMain ( VOID ); - -#endif