diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c index 349d37b045fb9..628e71439e3eb 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c @@ -102,7 +102,6 @@ X509ConstructCertificateStackV ( STACK_OF (X509) *CertStack; BOOLEAN Status; - UINTN Index; // // Check input parameters. @@ -124,7 +123,7 @@ X509ConstructCertificateStackV ( } } - for (Index = 0; ; Index++) { + while (TRUE) { // // If Cert is NULL, then it is the end of the list. //