From d08ee4374fd0fe622ad2d70336cfcacbd8fd9ab4 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Thu, 23 Mar 2023 08:20:14 +1000 Subject: [PATCH] Fix #141, Zero out global data structure during initialization --- fsw/src/sample_app.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 2961237..6684f0b 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -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