X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FPCD%2FPei%2FPcd.c;h=41b34269a09d346efae447175535d59cc13aa282;hb=96cb78a1e33b9f686fdf1a0fc21a24a873885669;hp=0516bc8ab6f4b92c53d7ab2ac564a63e4dca178d;hpb=5944a83bacfe55abec4abec339c1acd76714c4dc;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c index 0516bc8ab6..41b34269a0 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c @@ -205,7 +205,7 @@ PeiPcdGet64 ( @param[in] TokenNumber The PCD token number. - @return The pointer to the buffer to be retrived. + @return The pointer to the buffer to be retrieved. **/ VOID * @@ -402,7 +402,7 @@ PeiPcdGet64Ex ( @param[in] Guid The token space for the token number. @param[in] ExTokenNumber The PCD token number. - @return The pointer to the buffer to be retrived. + @return The pointer to the buffer to be retrieved. **/ VOID * @@ -835,8 +835,10 @@ PeiRegisterCallBackOnSet ( return EFI_UNSUPPORTED; } - ASSERT (CallBackFunction != NULL); - + if (CallBackFunction == NULL) { + return EFI_INVALID_PARAMETER; + } + return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, TRUE); } @@ -864,8 +866,10 @@ PcdUnRegisterCallBackOnSet ( return EFI_UNSUPPORTED; } - ASSERT (CallBackFunction != NULL); - + if (CallBackFunction == NULL) { + return EFI_INVALID_PARAMETER; + } + return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, FALSE); } @@ -1091,7 +1095,7 @@ PeiPcdGetNextTokenSpace ( The max size of this PCD's value is described in PCD's definition in DEC file. @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table - @param MaxSize Maxmium size of PCD's value + @param MaxSize Maximum size of PCD's value @param Database Pcd database in PEI phase. @return PCD value's size for POINTER type PCD. @@ -1162,11 +1166,11 @@ GetPtrTypeSize ( The max size of this PCD's value is described in PCD's definition in DEC file. @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table - @param CurrentSize Maxmium size of PCD's value + @param CurrentSize Maximum size of PCD's value @param Database Pcd database in PEI phase. - @retval TRUE Success to set PCD's value size, which is not exceed maxmium size - @retval FALSE Fail to set PCD's value size, which maybe exceed maxmium size + @retval TRUE Success to set PCD's value size, which is not exceed maximum size + @retval FALSE Fail to set PCD's value size, which maybe exceed maximum size **/ BOOLEAN