-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1944, use 0 as the invalid CFE_SB_MsgId_t value
Historically the CFE_SB_MSG_ID_INVALID constant was defined as 0xFFFFFFFF/-1, where 0 was considered valid. Although 0 is indeed valid for the first word of a CCSDS primary spacepacket header, it is not actually valid for use with SB. Because SB is now more decoupled from CCSDS header definitions, there are a number of advantages to using 0 instead of -1, as it is more passively safe: - Objects which are cleared as part of normal BSS clearing will be set invalid - Objects which are memset to zero will be set invalid In contrast, when the invalid value is nonzero, objects which are memset/cleared are valid by default, and must be actively set invalid to be safe.
- Loading branch information
Showing
5 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters