Skip to content

Commit

Permalink
Fix #1518, Rename misnomer function name CFE_TBLNotifyTblUsersOfUpdate()
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Mar 23, 2024
1 parent ed1faf4 commit 26f3bea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ CFE_Status_t CFE_TBL_Load(CFE_TBL_Handle_t TblHandle, CFE_TBL_SrcEnum_t SrcType,
strncpy(RegRecPtr->LastFileLoaded, WorkingBufferPtr->DataSource, sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);
CFE_TBL_MarkTblAsUpdated(RegRecPtr);

/* If the table is a critical table, update the appropriate CDS with the new data */
if (RegRecPtr->CriticalTable == true)
Expand Down
10 changes: 5 additions & 5 deletions modules/tbl/fsw/src/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ int32 CFE_TBL_UpdateInternal(CFE_TBL_Handle_t TblHandle, CFE_TBL_RegistryRec_t *
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);
CFE_TBL_MarkTblAsUpdated(RegRecPtr);

/* If the table is a critical table, update the appropriate CDS with the new data */
if (RegRecPtr->CriticalTable == true)
Expand Down Expand Up @@ -995,7 +995,7 @@ int32 CFE_TBL_UpdateInternal(CFE_TBL_Handle_t TblHandle, CFE_TBL_RegistryRec_t *
/* Free the working buffer */
CFE_TBL_Global.LoadBuffs[RegRecPtr->LoadInProgress].Taken = false;

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);
CFE_TBL_MarkTblAsUpdated(RegRecPtr);

/* If the table is a critical table, update the appropriate CDS with the new data */
if (RegRecPtr->CriticalTable == true)
Expand All @@ -1015,7 +1015,7 @@ int32 CFE_TBL_UpdateInternal(CFE_TBL_Handle_t TblHandle, CFE_TBL_RegistryRec_t *
* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
void CFE_TBL_NotifyTblUsersOfUpdate(CFE_TBL_RegistryRec_t *RegRecPtr)
void CFE_TBL_MarkTblAsUpdated(CFE_TBL_RegistryRec_t *RegRecPtr)

Check notice

Code scanning / CodeQL-coding-standard

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
{
CFE_TBL_Handle_t AccessIterator;

Expand Down Expand Up @@ -1764,7 +1764,7 @@ CFE_Status_t CFE_TBL_RestoreTableDataFromCDS(CFE_TBL_RegistryRec_t *RegRecPtr, c
CFE_ES_CalculateCRC(WorkingBufferPtr->BufferPtr, RegRecPtr->Size, 0, CFE_MISSION_ES_DEFAULT_CRC);

/* Make sure everyone who sees the table knows that it has been updated */
CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);
CFE_TBL_MarkTblAsUpdated(RegRecPtr);

/* Make sure the caller realizes the contents have been initialized */
Status = CFE_TBL_INFO_RECOVERED_TBL;
Expand Down Expand Up @@ -1818,4 +1818,4 @@ void CFE_TBL_RegisterWithCriticalTableRegistry(CFE_TBL_CritRegRec_t *CritRegRecP

/* Mark the table as critical for future reference */
RegRecPtr->CriticalTable = true;
}
}
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ int32 CFE_TBL_UpdateInternal(CFE_TBL_Handle_t TblHandle, CFE_TBL_RegistryRec_t *
**
** \param[in] RegRecPtr Pointer to Table Registry Entry for table to be updated
*/
void CFE_TBL_NotifyTblUsersOfUpdate(CFE_TBL_RegistryRec_t *RegRecPtr);
void CFE_TBL_MarkTblAsUpdated(CFE_TBL_RegistryRec_t *RegRecPtr);

/*---------------------------------------------------------------------------------------*/
/**
Expand Down

0 comments on commit 26f3bea

Please sign in to comment.