Skip to content

Commit

Permalink
Merge pull request nasa#892 from skliper/fix890-calccrc-rtn-stub
Browse files Browse the repository at this point in the history
Fix nasa#890, CFE_ES_CalculateCRC default stub behavior
  • Loading branch information
yammajamma authored Sep 24, 2020
2 parents 56254e9 + b7d0b52 commit a713784
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions fsw/cfe-core/ut-stubs/ut_es_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void CFE_ES_PerfLogAdd(uint32 Marker, uint32 EntryExit)
** None
**
** \returns
** Returns 332424.
** Returns either a user-defined status flag or CFE_SUCCESS.
**
******************************************************************************/
uint32 CFE_ES_CalculateCRC(const void *DataPtr,
Expand All @@ -764,16 +764,11 @@ uint32 CFE_ES_CalculateCRC(const void *DataPtr,
UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_CalculateCRC), InputCRC);
UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_CalculateCRC), TypeCRC);

uint32 result;
uint32 status;

UT_DEFAULT_IMPL(CFE_ES_CalculateCRC);
status = UT_DEFAULT_IMPL(CFE_ES_CalculateCRC);

if (UT_Stub_CopyToLocal(UT_KEY(CFE_ES_CalculateCRC), (uint8*)&result, sizeof(result)) < sizeof(result))
{
result = 332424;
}

return result;
return status;
}

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

0 comments on commit a713784

Please sign in to comment.