Skip to content

Commit

Permalink
Fix #141, Zero out global data structure during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Mar 22, 2023
1 parent a410436 commit d08ee43
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 d08ee43

Please sign in to comment.