Skip to content

Commit

Permalink
Fix #126, Refactor CFE_PSP_ModuleType_t enum
Browse files Browse the repository at this point in the history
Avoids irregular enum warning
  • Loading branch information
skliper committed Jan 6, 2021
1 parent 3178920 commit 97284ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions fsw/shared/inc/cfe_psp_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

typedef enum
{
CFE_PSP_MODULE_TYPE_INVALID = 0,
CFE_PSP_MODULE_TYPE_VALID_RANGE = 1000,
CFE_PSP_MODULE_TYPE_INVALID = 1000,
CFE_PSP_MODULE_TYPE_SIMPLE,
/* May be extended in the future */
CFE_PSP_MODULE_TYPE_MAX
Expand Down
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 @@ -65,7 +65,7 @@ void CFE_PSP_ModuleInit(void)
while(Entry->Name != NULL)
{
ApiPtr = (CFE_PSP_ModuleApi_t *)Entry->Api;
if ((uint32)ApiPtr->ModuleType > CFE_PSP_MODULE_TYPE_VALID_RANGE &&
if ((uint32)ApiPtr->ModuleType > CFE_PSP_MODULE_TYPE_INVALID &&
(uint32)ApiPtr->ModuleType < CFE_PSP_MODULE_TYPE_MAX &&
ApiPtr->Init != NULL)
{
Expand Down

0 comments on commit 97284ee

Please sign in to comment.