diff --git a/fsw/src/cs_compute.c b/fsw/src/cs_compute.c index 145c1ff..05ea41f 100644 --- a/fsw/src/cs_compute.c +++ b/fsw/src/cs_compute.c @@ -312,10 +312,9 @@ CFE_Status_t CS_ComputeApp(CS_Res_App_Table_Entry_t *ResultsEntry, uint32 *Compu int32 NumBytesRemainingCycles = 0; uint32 NewChecksumValue = 0; CFE_Status_t Status = CFE_SUCCESS; - CFE_Status_t Result; - CFE_Status_t ResultGetResourceID = CS_ERROR; - CFE_Status_t ResultGetResourceInfo = CS_ERROR; - bool ResultAddressValid = false; + CFE_Status_t ResultGetResourceID = CS_ERROR; + CFE_Status_t ResultGetResourceInfo = CS_ERROR; + bool ResultAddressValid = false; /* variables to get applications address */ CFE_ResourceId_t ResourceID = CFE_RESOURCEID_UNDEFINED; @@ -332,17 +331,15 @@ CFE_Status_t CS_ComputeApp(CS_Res_App_Table_Entry_t *ResultsEntry, uint32 *Compu /* Also check for a matching library name */ ResultGetResourceID = CFE_ES_GetLibIDByName((CFE_ES_LibId_t *)&ResourceID, ResultsEntry->Name); } - Result = ResultGetResourceID; - if (Result == CFE_SUCCESS) + if (ResultGetResourceID == CFE_SUCCESS) { /* We got a valid ResourceID, so get the Resource info */ ResultGetResourceInfo = CFE_ES_GetModuleInfo(&AppInfo, ResourceID); - Result = ResultGetResourceInfo; } - if (Result == CFE_SUCCESS) + if (ResultGetResourceInfo == CFE_SUCCESS) { /* We got a valid ResourceID and good App info, so check the for valid addresses */ @@ -350,19 +347,18 @@ 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); - Result = CS_ERROR; + ResultGetResourceInfo = CS_ERROR; } else { /* Push in the data from the module info */ ResultsEntry->NumBytesToChecksum = AppInfo.CodeSize; ResultsEntry->StartAddress = AppInfo.CodeAddress; - Result = CFE_SUCCESS; ResultAddressValid = true; } } - if (Result == CFE_SUCCESS) + if (ResultGetResourceInfo == CFE_SUCCESS) { /* We got valid ResourceID, good info, and valid addresses, so run the checksum */