Skip to content

Commit

Permalink
Fix nasa#1108, clean up ifdef blocks
Browse files Browse the repository at this point in the history
Remove code blocks that were commented out, not needed.
  • Loading branch information
jphickey committed Feb 1, 2021
1 parent 9ea38b6 commit f7be6e3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 73 deletions.
16 changes: 0 additions & 16 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,22 +1543,6 @@ int32 CFE_ES_CleanUpApp(CFE_ES_AppId_t AppId)
*/
CFE_ES_LockSharedData(__func__,__LINE__);

#ifdef jphfix
/*
* This just confirms that the main task ID associated with this app was properly
* located and deleted during the previous process.
*
* If not, display a log message about it - this indicates table corruption or a
* bug with the record keeping.
*/
if (NumTasks == 0 || !CFE_RESOURCEID_TEST_EQUAL(TaskList[0], AppRecPtr->MainTaskId))
{
CFE_ES_SysLogWrite_Unsync("CFE_ES_CleanUpApp: MainTask ID:%lu not found when deleting AppID %lu\n",
CFE_RESOURCEID_TO_ULONG(AppRecPtr->MainTaskId), CFE_RESOURCEID_TO_ULONG(AppId));
ReturnCode = CFE_ES_APP_CLEANUP_ERR;
}
#endif

/*
* Free all task records.
*/
Expand Down
57 changes: 0 additions & 57 deletions fsw/cfe-core/ut-stubs/ut_resourceid_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,60 +119,3 @@ int32 CFE_ResourceId_ToIndex(CFE_ResourceId_t Id, uint32 BaseValue, uint32 Table
return return_code;
}

#ifdef jphfix
/*********************************************************************/
/*
* CFE_ResourceId_ToOSAL
*
* For complete API information, see prototype in header
*/
osal_id_t CFE_ResourceId_ToOSAL(CFE_ResourceId_t id)
{
UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ResourceId_ToOSAL), id);

int32 return_code;
osal_id_t idbuf;

return_code = UT_DEFAULT_IMPL(CFE_ResourceId_ToOSAL);

if (return_code != CFE_SUCCESS)
{
idbuf = OS_OBJECT_ID_UNDEFINED;
}
else if (UT_Stub_CopyToLocal(UT_KEY(CFE_ResourceId_ToOSAL), &idbuf, sizeof(idbuf)) < sizeof(idbuf))
{
/* default output is just the same value with the mark unset */
idbuf = OS_ObjectIdFromInteger(CFE_ResourceId_ToInteger(id) & ~CFE_RESOURCEID_MARK);
}

return idbuf;
}

/*********************************************************************/
/*
* CFE_ResourceId_FromOSAL
*
* For complete API information, see prototype in header
*/
CFE_ResourceId_t CFE_ResourceId_FromOSAL(osal_id_t id)
{
UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ResourceId_FromOSAL), id);

int32 return_code;
CFE_ResourceId_t idbuf;

return_code = UT_DEFAULT_IMPL(CFE_ResourceId_FromOSAL);

if (return_code != CFE_SUCCESS)
{
idbuf = CFE_RESOURCEID_UNDEFINED;
}
else if (UT_Stub_CopyToLocal(UT_KEY(CFE_ResourceId_FromOSAL), &idbuf, sizeof(idbuf)) < sizeof(idbuf))
{
/* default output is just the same value with the mark set */
idbuf = CFE_ResourceId_FromInteger(OS_ObjectIdToInteger(id) | CFE_RESOURCEID_MARK);
}

return idbuf;
}
#endif

0 comments on commit f7be6e3

Please sign in to comment.