Skip to content

Commit

Permalink
Merge pull request nasa#441 from CDKnightNASA:fix440-memset_handler_p…
Browse files Browse the repository at this point in the history
…aram

Fix nasa#440 - rename parameter in CFE_PSP_MemSet handler to align with stub and actual code
  • Loading branch information
dzbaker committed Dec 10, 2024
2 parents ab82f6a + 799d25a commit 2916bae
Showing 1 changed file with 3 additions and 3 deletions.
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);
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

0 comments on commit 2916bae

Please sign in to comment.