Skip to content

Commit 97284ee

Browse files
committed
Fix #126, Refactor CFE_PSP_ModuleType_t enum
Avoids irregular enum warning
1 parent 3178920 commit 97284ee

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: fsw/shared/inc/cfe_psp_module.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535

3636
typedef enum
3737
{
38-
CFE_PSP_MODULE_TYPE_INVALID = 0,
39-
CFE_PSP_MODULE_TYPE_VALID_RANGE = 1000,
38+
CFE_PSP_MODULE_TYPE_INVALID = 1000,
4039
CFE_PSP_MODULE_TYPE_SIMPLE,
4140
/* May be extended in the future */
4241
CFE_PSP_MODULE_TYPE_MAX

Diff for: fsw/shared/src/cfe_psp_module.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void CFE_PSP_ModuleInit(void)
6565
while(Entry->Name != NULL)
6666
{
6767
ApiPtr = (CFE_PSP_ModuleApi_t *)Entry->Api;
68-
if ((uint32)ApiPtr->ModuleType > CFE_PSP_MODULE_TYPE_VALID_RANGE &&
68+
if ((uint32)ApiPtr->ModuleType > CFE_PSP_MODULE_TYPE_INVALID &&
6969
(uint32)ApiPtr->ModuleType < CFE_PSP_MODULE_TYPE_MAX &&
7070
ApiPtr->Init != NULL)
7171
{

0 commit comments

Comments
 (0)