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 #440 - rename parameter in CFE_PSP_MemSet handler to align with stub and actual code #441

Merged
merged 1 commit into from
Dec 10, 2024
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
6 changes: 3 additions & 3 deletions ut-stubs/src/cfe_psp_memaccess_api_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void UT_DefaultHandler_CFE_PSP_MemCpy(void *UserObj, UT_EntryKey_t FuncKey, cons
/* CFE_PSP_MemCpy(void *dest, const void *src, uint32 size) */
void * dest = UT_Hook_GetArgValueByName(Context, "dest", void *);
const void *src = UT_Hook_GetArgValueByName(Context, "src", const void *);
uint32 size = UT_Hook_GetArgValueByName(Context, "size", uint32);
uint32 n = UT_Hook_GetArgValueByName(Context, "n", uint32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed variable was not updated in memcpy() on line 54. I've corrected this in commit e0fd658.

int32 Status;

UT_Stub_GetInt32StatusCode(Context, &Status);
Expand All @@ -65,13 +65,13 @@ void UT_DefaultHandler_CFE_PSP_MemSet(void *UserObj, UT_EntryKey_t FuncKey, cons
/* int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 size) */
void * dest = UT_Hook_GetArgValueByName(Context, "dest", void *);
uint8 value = UT_Hook_GetArgValueByName(Context, "value", uint8);
uint32 size = UT_Hook_GetArgValueByName(Context, "size", uint32);
uint32 n = UT_Hook_GetArgValueByName(Context, "n", uint32);
int32 Status;

UT_Stub_GetInt32StatusCode(Context, &Status);
if (Status >= 0)
{
memset(dest, value, size);
memset(dest, value, n);
}
}

Expand Down
Loading