Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #890, CFE_ES_CalculateCRC default stub behavior #892

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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