Skip to content

Commit

Permalink
Fix nasa#82, Convert integers holding boolean truth values to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed May 4, 2023
1 parent bd4dd1c commit aa585b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions fsw/inc/cs_tbldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ typedef struct
{
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
bool ComputedYet; /**< \brief Have we computed an Integrity value yet */
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
CFE_TBL_Handle_t TblHandle; /**< \brief handle recieved from CFE_TBL */
bool IsCSOwner; /**< \brief Is CS the original owner of this table */
bool Filler8; /**< \brief Padding */
uint16 Filler16; /**< \brief Padding */
char Name[CFE_TBL_MAX_FULL_NAME_LEN]; /**< \brief name of the table */
} CS_Res_Tables_Table_Entry_t;

Expand All @@ -132,7 +132,8 @@ typedef struct
{
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
bool ComputedYet; /**< \brief Have we computed an Integrity value yet */
bool Filler8; /** <\brief Padding */
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
Expand Down
5 changes: 2 additions & 3 deletions fsw/src/cs_compute.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ CFE_Status_t CS_ComputeApp(CS_Res_App_Table_Entry_t *ResultsEntry, uint32 *Compu
CFE_Status_t Result;
CFE_Status_t ResultGetResourceID = CS_ERROR;
CFE_Status_t ResultGetResourceInfo = CS_ERROR;
int32 ResultAddressValid = false;
bool ResultAddressValid = false;

/* variables to get applications address */
CFE_ResourceId_t ResourceID = CFE_RESOURCEID_UNDEFINED;
Expand Down Expand Up @@ -350,8 +350,7 @@ CFE_Status_t CS_ComputeApp(CS_Res_App_Table_Entry_t *ResultsEntry, uint32 *Compu
{
CFE_EVS_SendEvent(CS_COMPUTE_APP_PLATFORM_DBG_EID, CFE_EVS_EventType_DEBUG,
"CS cannot get a valid address for %s, due to the platform", ResultsEntry->Name);
ResultAddressValid = false;
Result = CS_ERROR;
Result = CS_ERROR;
}
else
{
Expand Down

0 comments on commit aa585b7

Please sign in to comment.