From 4641a522ad97b2ec2c0e7250e6eb37adfa58e09f Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Fri, 27 May 2022 13:29:58 -0600 Subject: [PATCH] Fix #32, Remove CFE_PSP_MemSet and CFE_PSP_MemSet use --- fsw/src/cs_app.c | 2 +- fsw/src/cs_table_processing.c | 12 ++++++------ unit-test/utilities/cs_test_utils.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fsw/src/cs_app.c b/fsw/src/cs_app.c index a52d51d..91dfde6 100644 --- a/fsw/src/cs_app.c +++ b/fsw/src/cs_app.c @@ -241,7 +241,7 @@ int32 CS_AppInit(void) if (Result == CFE_SUCCESS) { /* Zero out all data in CS_AppData, including the housekeeping data*/ - CFE_PSP_MemSet(&CS_AppData, 0, (unsigned)sizeof(CS_AppData)); + memset(&CS_AppData, 0, sizeof(CS_AppData)); CS_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN; diff --git a/fsw/src/cs_table_processing.c b/fsw/src/cs_table_processing.c index 456e11d..ddaf2ec 100644 --- a/fsw/src/cs_table_processing.c +++ b/fsw/src/cs_table_processing.c @@ -453,8 +453,8 @@ void CS_ProcessNewEepromMemoryDefinitionTable(const CS_Def_EepromMemory_Table_En uint16 PreviousState = CS_STATE_EMPTY; char TableType[CS_TABLETYPE_NAME_SIZE]; - CFE_PSP_MemCpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); - CFE_PSP_MemCpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); + memcpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); + memcpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); strncpy(&TableType[0], "Undef Tbl", CS_TABLETYPE_NAME_SIZE); /* Init the table type string */ @@ -556,8 +556,8 @@ void CS_ProcessNewTablesDefinitionTable(const CS_Def_Tables_Table_Entry_t *Defin char TableAppName[OS_MAX_API_NAME]; char TableTableName[CFE_MISSION_TBL_MAX_NAME_LENGTH]; - CFE_PSP_MemCpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); - CFE_PSP_MemCpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); + memcpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); + memcpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); CFE_ES_GetAppID(&AppID); CFE_ES_GetAppName(AppName, AppID, OS_MAX_API_NAME); @@ -740,8 +740,8 @@ void CS_ProcessNewAppDefinitionTable(const CS_Def_App_Table_Entry_t *DefinitionT uint16 NumRegionsInTable = 0; uint16 PreviousState = CS_STATE_EMPTY; - CFE_PSP_MemCpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); - CFE_PSP_MemCpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); + memcpy(&StartOfResultsTable, ResultsTblPtr, sizeof(StartOfResultsTable)); + memcpy(&StartOfDefTable, DefinitionTblPtr, sizeof(StartOfDefTable)); /* We don't want to be doing chekcksums while changing the table out */ diff --git a/unit-test/utilities/cs_test_utils.c b/unit-test/utilities/cs_test_utils.c index e8dc5b8..5b7ceda 100644 --- a/unit-test/utilities/cs_test_utils.c +++ b/unit-test/utilities/cs_test_utils.c @@ -78,7 +78,7 @@ void CS_Test_Setup(void) /* initialize test environment to default state for every test */ UT_ResetState(0); - memset(&CS_AppData, 0, sizeof(CS_AppData_t)); + memset(&CS_AppData, 0, sizeof(CS_AppData)); memset(context_CFE_EVS_SendEvent, 0, sizeof(context_CFE_EVS_SendEvent)); memset(&context_CFE_ES_WriteToSysLog, 0, sizeof(context_CFE_ES_WriteToSysLog));