Skip to content

Commit

Permalink
Fix nasa#303, check that module type is not invalid
Browse files Browse the repository at this point in the history
Rather than only calling "Init" on a "SIMPLE" module type, just
check that it is not invalid instead.  Even extension types
still have an Init routine that needs to be called.
  • Loading branch information
jphickey committed Sep 3, 2021
1 parent 6d40816 commit 82f5339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fsw/shared/src/cfe_psp_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void CFE_PSP_ModuleInitList(CFE_StaticModuleLoadEntry_t *ListPtr)
while (Entry->Name != NULL)
{
ApiPtr = (CFE_PSP_ModuleApi_t *)Entry->Api;
if ((uint32)ApiPtr->ModuleType == CFE_PSP_MODULE_TYPE_SIMPLE && ApiPtr->Init != NULL)
if ((uint32)ApiPtr->ModuleType != CFE_PSP_MODULE_TYPE_INVALID && ApiPtr->Init != NULL)
{
(*ApiPtr->Init)(CFE_PSP_MODULE_BASE | CFE_PSP_ModuleCount);
}
Expand Down

0 comments on commit 82f5339

Please sign in to comment.