diff --git a/modules/core_api/fsw/inc/cfe_resourceid.h b/modules/core_api/fsw/inc/cfe_resourceid.h index 98e4e08a0..ed4f85eb6 100644 --- a/modules/core_api/fsw/inc/cfe_resourceid.h +++ b/modules/core_api/fsw/inc/cfe_resourceid.h @@ -200,6 +200,7 @@ uint32 CFE_ResourceId_GetSerial(CFE_ResourceId_t ResourceId); * @param[in] CheckFunc a function to check if the given ID is available * @returns Next ID value which does not map to a valid entry * @retval #CFE_RESOURCEID_UNDEFINED if no open slots. + * @retval #CFE_ES_BAD_ARGUMENT @copybrief CFE_ES_BAD_ARGUMENT * */ CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 TableSize, diff --git a/modules/resourceid/fsw/src/cfe_resourceid_api.c b/modules/resourceid/fsw/src/cfe_resourceid_api.c index 022bb9b86..2c2dd9f52 100644 --- a/modules/resourceid/fsw/src/cfe_resourceid_api.c +++ b/modules/resourceid/fsw/src/cfe_resourceid_api.c @@ -108,7 +108,7 @@ int32 CFE_ResourceId_ToIndex(CFE_ResourceId_t Id, uint32 BaseValue, uint32 Table * * Function: CFE_ResourceId_FindNext * - * Application-scope internal function + * Implemented per public API * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ @@ -121,6 +121,11 @@ CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 TableS CFE_ResourceId_t CheckId; bool IsTaken; + if (CheckFunc == NULL) + { + return CFE_ES_BAD_ARGUMENT; + } + ResourceType = CFE_ResourceId_GetBase(StartId); Serial = CFE_ResourceId_GetSerial(StartId);