Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cFE Integration candidate: Caelum+dev3 #2043

Merged
merged 9 commits into from
Feb 3, 2022
19 changes: 14 additions & 5 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ name: "CodeQL Analysis"

on:
push:
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.dox'

pull_request:

paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.dox'

jobs:
codeql:
name: CodeQL Analysis
uses: nasa/cFS/.github/workflows/codeql-build.yml@main
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
with:
make-prep: 'make prep'
make: 'make -C build/native/default_cpu1 core_api core_private es evs fs msg resourceid sb sbr tbl time'
component-path: cfe
make: make -j8
test: true
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Changelog

### Development Build: v7.0.0-rc4+dev70

- Improve CFE_SB_IsValidMsgId handler
- Update CodeQL workflow
- Replace CFE_SB_ValueToMsgId(0) with CFE_SB_INVALID_MSG_ID
- See <https://github.com/nasa/cFE/pull/2043> and <https://github.com/nasa/cFS/pull/414>


### Development Build: v7.0.0-rc4+dev60

- Add CFE_ES_AppInfo_t element documentation
Expand Down
6 changes: 6 additions & 0 deletions docs/src/mnem_maps/cfe_es_tlm_mnem_map
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ ES_APPFILENAME=$sc_$cpu_ES_AppFilename[OS_MAX_PATH_LEN] \
ES_STACKSIZE=$sc_$cpu_ES_StackSize \
ES_MODULEID=$sc_$cpu_ES_ModuleID \
ES_ADDRVALID=$sc_$cpu_ES_AddrsValid \
ES_CODEADDR=$sc_$cpu_ES_CodeAddress \
ES_CODESIZE=$sc_$cpu_ES_CodeSize \
ES_DATAADDR=$sc_$cpu_ES_DataAddress \
ES_DATASIZE=$sc_$cpu_ES_DataSize \
ES_BSSADDR=$sc_$cpu_ES_BSSAddress \
ES_BSSSIZE=$sc_$cpu_ES_BSSSize \
ES_STARTADDR=$sc_$cpu_ES_StartAddr \
ES_EXCEPTNACTN=$sc_$cpu_ES_ExceptnActn \
ES_PRIORITY=$sc_$cpu_ES_Priority \
Expand Down
37 changes: 18 additions & 19 deletions modules/cfe_testcase/src/es_info_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,19 @@ void TestAppInfo(void)

if (TestAppInfo.AddressesAreValid)
{
UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> Addrs.Valid? = %d",
UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> AddrsValid? = %d",
(int)TestAppInfo.AddressesAreValid);
UtAssert_True(TestAppInfo.Code.Address > 0, "Test App Info -> Code.Address = %ld",
(unsigned long)TestAppInfo.Code.Address);
UtAssert_True(TestAppInfo.Code.Size > 0, "Test App Info -> Code.Size = %ld",
(unsigned long)TestAppInfo.Code.Size);
UtAssert_True(TestAppInfo.Data.Address > 0, "Test App Info -> Data.Address = %ld",
(unsigned long)TestAppInfo.Data.Address);
UtAssert_True(TestAppInfo.Data.Size > 0, "Test App Info -> Data.Size = %ld",
(unsigned long)TestAppInfo.Data.Size);
UtAssert_True(TestAppInfo.BSS.Address > 0, "Test App Info -> BSS.Address = %ld",
(unsigned long)TestAppInfo.BSS.Address);
UtAssert_True(TestAppInfo.BSS.Size > 0, "Test App Info -> BSS.Size = %ld",
(unsigned long)TestAppInfo.BSS.Size);
UtAssert_True(TestAppInfo.CodeAddress > 0, "Test App Info -> CodeAddress = %ld",
(unsigned long)TestAppInfo.CodeAddress);
UtAssert_True(TestAppInfo.CodeSize > 0, "Test App Info -> CodeSize = %ld",
(unsigned long)TestAppInfo.CodeSize);
UtAssert_True(TestAppInfo.DataAddress > 0, "Test App Info -> DataAddress = %ld",
(unsigned long)TestAppInfo.DataAddress);
UtAssert_True(TestAppInfo.DataSize > 0, "Test App Info -> DataSize = %ld",
(unsigned long)TestAppInfo.DataSize);
UtAssert_True(TestAppInfo.BSSAddress > 0, "Test App Info -> BSSAddress = %ld",
(unsigned long)TestAppInfo.BSSAddress);
UtAssert_True(TestAppInfo.BSSSize > 0, "Test App Info -> BSSSize = %ld", (unsigned long)TestAppInfo.BSSSize);
}
else
{
Expand Down Expand Up @@ -191,12 +190,12 @@ void TestLibInfo(void)
{
UtAssert_True(LibInfo.AddressesAreValid > 0, "Lib Info -> AddrsValid? = %ld",
(unsigned long)LibInfo.AddressesAreValid);
UtAssert_True(LibInfo.Code.Address > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.Code.Address);
UtAssert_True(LibInfo.Code.Size > 0, "Lib Info -> Code.Size = %ld", (unsigned long)LibInfo.Code.Size);
UtAssert_True(LibInfo.Data.Address > 0, "Lib Info -> Data.Address = %ld", (unsigned long)LibInfo.Data.Address);
UtAssert_True(LibInfo.Data.Size > 0, "Lib Info -> Data.Size = %ld", (unsigned long)LibInfo.Data.Size);
UtAssert_True(LibInfo.BSS.Address > 0, "Lib Info -> BSS.Address = %ld", (unsigned long)LibInfo.BSS.Address);
UtAssert_True(LibInfo.BSS.Size > 0, "Lib Info -> BSS.Size = %ld", (unsigned long)LibInfo.BSS.Size);
UtAssert_True(LibInfo.CodeAddress > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.CodeAddress);
UtAssert_True(LibInfo.CodeSize > 0, "Lib Info -> CodeSize = %ld", (unsigned long)LibInfo.CodeSize);
UtAssert_True(LibInfo.DataAddress > 0, "Lib Info -> DataAddress = %ld", (unsigned long)LibInfo.DataAddress);
UtAssert_True(LibInfo.DataSize > 0, "Lib Info -> DataSize = %ld", (unsigned long)LibInfo.DataSize);
UtAssert_True(LibInfo.BSSAddress > 0, "Lib Info -> BSSAddress = %ld", (unsigned long)LibInfo.BSSAddress);
UtAssert_True(LibInfo.BSSSize > 0, "Lib Info -> BSSSize = %ld", (unsigned long)LibInfo.BSSSize);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/message_id_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void TestMsgId(void)
void TestGetTypeFromMsgId(void)
{
UtPrintf("Testing: CFE_MSG_GetTypeFromMsgId");
CFE_SB_MsgId_t msgid = CFE_SB_ValueToMsgId(0);
CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID;
CFE_MSG_Type_t msgtype;
int32 status;

Expand Down
4 changes: 2 additions & 2 deletions modules/cfe_testcase/src/msg_api_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void TestMsgApiBasic(void)
msgId = CFE_SB_ValueToMsgId(1);

/* test msg-init */
UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_ValueToMsgId(0), sizeof(cmd)), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_INVALID_MSG_ID, sizeof(cmd)), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), msgId, 0), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(
CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID + 1), sizeof(cmd)),
Expand Down Expand Up @@ -139,7 +139,7 @@ void TestMsgApiAdvanced(void)
CFE_MSG_SequenceCount_t seqCnt;

memset(&cmd, 0xFF, sizeof(cmd));
msgId = CFE_SB_ValueToMsgId(0);
msgId = CFE_SB_INVALID_MSG_ID;

UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), msgId, sizeof(cmd)), CFE_SUCCESS);

Expand Down
26 changes: 12 additions & 14 deletions modules/core_api/fsw/inc/cfe_es_extern_typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,6 @@ typedef uint32 CFE_ES_MemAddress_t;
*/
#define CFE_ES_MEMADDRESS_C(x) ((CFE_ES_MemAddress_t)((cpuaddr)(x)&0xFFFFFFFF))

/**
* Memory Address and Memory Offset combination
*
* A combination of #CFE_ES_MemAddress_t and #CFE_ES_MemOffset_t, since they are often used together.
*/
typedef struct CFE_ES_MemAddOff
{
CFE_ES_MemAddress_t Address; /**< \brief Code section address */
CFE_ES_MemOffset_t Size; /**< \brief Code section size */
} CFE_ES_MemAddOff_t;

/*
* Data Structures shared between API and Message (CMD/TLM) interfaces
*/
Expand Down Expand Up @@ -470,9 +459,18 @@ typedef struct CFE_ES_AppInfo
\brief The Stack Size of the Application */
uint32 AddressesAreValid; /**< \cfetlmmnemonic \ES_ADDRVALID
\brief Indicates that the Code, Data, and BSS addresses/sizes are valid */
CFE_ES_MemAddOff_t Code; /**< \brief code section address/size structure */
CFE_ES_MemAddOff_t Data; /**< \brief Data section address/size structure */
CFE_ES_MemAddOff_t BSS; /**< \brief BSS section address/size structure */
CFE_ES_MemAddress_t CodeAddress; /**< \cfetlmmnemonic \ES_CODEADDR
\brief The Address of the Application Code Segment*/
CFE_ES_MemOffset_t CodeSize; /**< \cfetlmmnemonic \ES_CODESIZE
\brief The Code Size of the Application */
CFE_ES_MemAddress_t DataAddress; /**< \cfetlmmnemonic \ES_DATAADDR
\brief The Address of the Application Data Segment*/
CFE_ES_MemOffset_t DataSize; /**< \cfetlmmnemonic \ES_DATASIZE
\brief The Data Size of the Application */
CFE_ES_MemAddress_t BSSAddress; /**< \cfetlmmnemonic \ES_BSSADDR
\brief The Address of the Application BSS Segment*/
CFE_ES_MemOffset_t BSSSize; /**< \cfetlmmnemonic \ES_BSSSIZE
\brief The BSS Size of the Application */
CFE_ES_MemAddress_t StartAddress; /**< \cfetlmmnemonic \ES_STARTADDR
\brief The Start Address of the Application */
CFE_ES_ExceptionAction_Enum_t ExceptionAction; /**< \cfetlmmnemonic \ES_EXCEPTNACTN
Expand Down
2 changes: 1 addition & 1 deletion modules/core_api/fsw/inc/cfe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define CFE_VERSION_H

/* Development Build Macro Definitions */
#define CFE_BUILD_NUMBER 60 /**< @brief Development: Number of development commits since baseline */
#define CFE_BUILD_NUMBER 70 /**< @brief Development: Number of development commits since baseline */
#define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */

/* Version Macro Definitions updated for official releases only */
Expand Down
17 changes: 12 additions & 5 deletions modules/core_api/ut-stubs/src/cfe_sb_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,19 @@ void UT_DefaultHandler_CFE_SB_GetUserDataLength(void *UserObj, UT_EntryKey_t Fun
*------------------------------------------------------------*/
void UT_DefaultHandler_CFE_SB_IsValidMsgId(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context)
{
int32 status;
bool return_value;

UT_Stub_GetInt32StatusCode(Context, &status);
int32 status;
bool return_value;
CFE_SB_MsgId_t MsgId = UT_Hook_GetArgValueByName(Context, "MsgId", CFE_SB_MsgId_t);

return_value = status;
if (UT_Stub_GetInt32StatusCode(Context, &status))
{
return_value = status;
}
else
{
/* The only invalid value UT's should be using is CFE_SB_INVALID_MSG_ID */
return_value = !CFE_SB_MsgId_Equal(MsgId, CFE_SB_INVALID_MSG_ID);
}

UT_Stub_SetReturnValue(FuncKey, return_value);
}
Expand Down
30 changes: 30 additions & 0 deletions modules/es/eds/cfe_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,36 @@
\cfetlmmnemonic \ES_ADDRVALID
</LongDescription>
</Entry>
<Entry name="CodeAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application Code Segment">
<LongDescription>
\cfetlmmnemonic \ES_CODEADDR
</LongDescription>
</Entry>
<Entry name="CodeSize" type="BASE_TYPES/CpuAddress" shortDescription="The Code Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_CODESIZE
</LongDescription>
</Entry>
<Entry name="DataAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application Data Segment">
<LongDescription>
\cfetlmmnemonic \ES_DATAADDR
</LongDescription>
</Entry>
<Entry name="DataSize" type="BASE_TYPES/CpuAddress" shortDescription="The Data Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_DATASIZE
</LongDescription>
</Entry>
<Entry name="BSSAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application BSS Segment">
<LongDescription>
\cfetlmmnemonic \ES_BSSADDR
</LongDescription>
</Entry>
<Entry name="BSSSize" type="BASE_TYPES/CpuAddress" shortDescription="The BSS Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_BSSSIZE
</LongDescription>
</Entry>
<Entry name="StartAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Start Address of the Application">
<LongDescription>
\cfetlmmnemonic \ES_STARTADDR
Expand Down
14 changes: 7 additions & 7 deletions modules/es/fsw/src/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP
if (OsStatus == OS_SUCCESS)
{
AppInfoPtr->AddressesAreValid =
(sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->Code.Address)) && ModuleInfo.addr.valid;
(sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->CodeAddress)) && ModuleInfo.addr.valid;
}
else
{
Expand All @@ -1803,10 +1803,10 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP
* Convert the internal size and address to the telemetry format.
* (The telemetry format may be a different bitwidth than the native processor)
*/
AppInfoPtr->Code.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address);
AppInfoPtr->Code.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size);
AppInfoPtr->Data.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address);
AppInfoPtr->Data.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size);
AppInfoPtr->BSS.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address);
AppInfoPtr->BSS.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size);
AppInfoPtr->CodeAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address);
AppInfoPtr->CodeSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size);
AppInfoPtr->DataAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address);
AppInfoPtr->DataSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size);
AppInfoPtr->BSSAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address);
AppInfoPtr->BSSSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size);
}
2 changes: 1 addition & 1 deletion modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void Test_MSG_Init_Ext(void)

/* Get msgid version by checking if msgid sets "has secondary" field*/
memset(&msg, 0xFF, sizeof(msg));
CFE_UtAssert_SUCCESS(CFE_MSG_SetMsgId(&msg, CFE_SB_ValueToMsgId(0)));
CFE_UtAssert_SUCCESS(CFE_MSG_SetMsgId(&msg, CFE_SB_INVALID_MSG_ID));
CFE_UtAssert_SUCCESS(CFE_MSG_GetHasSecondaryHeader(&msg, &hassec));
is_v1 = !hassec;

Expand Down
4 changes: 2 additions & 2 deletions modules/msg/ut-coverage/test_cfe_msg_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ void Test_MSG_Init(void)
bool is_v1;

UtPrintf("Bad parameter tests, Null pointer, invalid size, invalid msgid");
UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_ValueToMsgId(0), sizeof(cmd)), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(0), 0), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_INVALID_MSG_ID, sizeof(cmd)), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_INVALID_MSG_ID, 0), CFE_MSG_BAD_ARGUMENT);
UtAssert_INT32_EQ(
CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID + 1), sizeof(cmd)),
CFE_MSG_BAD_ARGUMENT);
Expand Down
2 changes: 1 addition & 1 deletion modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
void Test_MSG_GetTypeFromMsgId(void)
{
CFE_MSG_Message_t msg;
CFE_SB_MsgId_t msgid = CFE_SB_ValueToMsgId(0);
CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID;
CFE_MSG_Type_t actual = CFE_MSG_Type_Invalid;

UtPrintf("Bad parameter tests, Null pointer");
Expand Down
6 changes: 3 additions & 3 deletions modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ void Test_SBR_Map_Direct(void)
uint32 i;

UtPrintf("Invalid msg checks");
UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_ValueToMsgId(0), CFE_SBR_ValueToRouteId(0)), 0);
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(0))));
UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_INVALID_MSG_ID, CFE_SBR_ValueToRouteId(0)), 0);
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_INVALID_MSG_ID)));

UtPrintf("Initialize map");
CFE_SBR_Init_Map();
Expand Down Expand Up @@ -83,7 +83,7 @@ void Test_SBR_Map_Direct(void)

UtPrintf("Set/Get a range of ids ");
routeid = CFE_SBR_ValueToRouteId(CFE_PLATFORM_SB_MAX_MSG_IDS + 1);
msgid = CFE_SB_ValueToMsgId(0);
msgid = CFE_SB_INVALID_MSG_ID;
UtAssert_INT32_EQ(CFE_SBR_SetRouteId(msgid, routeid), 0);
UtAssert_INT32_EQ(CFE_SBR_GetRouteId(msgid).RouteId, routeid.RouteId);

Expand Down
6 changes: 3 additions & 3 deletions modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void Test_SBR_Map_Hash(void)
uint32 collisions;

UtPrintf("Invalid msg checks");
UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_ValueToMsgId(0), CFE_SBR_ValueToRouteId(0)), 0);
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(0))));
UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_INVALID_MSG_ID, CFE_SBR_ValueToRouteId(0)), 0);
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_INVALID_MSG_ID)));

UtPrintf("Initialize routing and map");
CFE_SBR_Init();
Expand Down Expand Up @@ -102,7 +102,7 @@ void Test_SBR_Map_Hash(void)

/* Note AddRoute required for hash logic to work since it depends on MsgId in routing table */
UtPrintf("Add routes and check with a rollover and a skip");
msgid[0] = CFE_SB_ValueToMsgId(0);
msgid[0] = CFE_SB_INVALID_MSG_ID;
msgid[1] = Test_SBR_Unhash(0xFFFFFFFF);
msgid[2] = Test_SBR_Unhash(0x7FFFFFFF);
routeid[0] = CFE_SBR_AddRoute(msgid[0], &collisions);
Expand Down
6 changes: 3 additions & 3 deletions modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void Test_SBR_Route_Unsort_General(void)
CFE_SBR_Init();

UtPrintf("Invalid msg checks");
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_ValueToMsgId(0), NULL)));
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_ValueToMsgId(0), &collisions)));
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_INVALID_MSG_ID, NULL)));
UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_INVALID_MSG_ID, &collisions)));
UtAssert_INT32_EQ(collisions, 0);

/*
Expand Down Expand Up @@ -159,7 +159,7 @@ void Test_SBR_Route_Unsort_GetSet(void)
UtAssert_INT32_EQ(count, 0);

UtPrintf("Add routes and initialize values for testing");
msgid[0] = CFE_SB_ValueToMsgId(0);
msgid[0] = CFE_SB_INVALID_MSG_ID;
msgid[1] = CFE_SB_ValueToMsgId(1);
msgid[2] = CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID);

Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void CFE_TBL_InitData(void)
sizeof(CFE_TBL_Global.TblRegPacket));

/* Message ID is set when sent, so OK as 0 here */
CFE_MSG_Init(CFE_MSG_PTR(CFE_TBL_Global.NotifyMsg.CommandHeader), CFE_SB_ValueToMsgId(0),
CFE_MSG_Init(CFE_MSG_PTR(CFE_TBL_Global.NotifyMsg.CommandHeader), CFE_SB_INVALID_MSG_ID,
sizeof(CFE_TBL_Global.NotifyMsg));
}

Expand Down