Skip to content

Commit

Permalink
Merge pull request #201 from thnkslprpt:fix-141-zero-out-global-data-…
Browse files Browse the repository at this point in the history
…structure

Fix #141, Zero out global data structure during initialization
  • Loading branch information
dzbaker committed Oct 30, 2023
2 parents f764a7f + d08ee43 commit d1e8102
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,10 @@ int32 SAMPLE_APP_Init(void)
{
int32 status;

SAMPLE_APP_Data.RunStatus = CFE_ES_RunStatus_APP_RUN;
/* Zero out the global data structure */
memset(&SAMPLE_APP_Data, 0, sizeof(SAMPLE_APP_Data));

/*
** Initialize app command execution counters
*/
SAMPLE_APP_Data.CmdCounter = 0;
SAMPLE_APP_Data.ErrCounter = 0;
SAMPLE_APP_Data.RunStatus = CFE_ES_RunStatus_APP_RUN;

/*
** Initialize app configuration data
Expand Down

0 comments on commit d1e8102

Please sign in to comment.