From 3bf80871575e217df52e61bed39d06841f44aa14 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 1 Dec 2023 14:01:29 -0500 Subject: [PATCH] Fix #59, remove unneeded stack object Remove the Initial dwell table object from MD_InitTableServices. This object was not actually used, and consumed several kB of stack space unnecessarily, depending on the size of the table. --- fsw/src/md_app.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fsw/src/md_app.c b/fsw/src/md_app.c index 9a4891f..9ded3be 100644 --- a/fsw/src/md_app.c +++ b/fsw/src/md_app.c @@ -328,16 +328,11 @@ CFE_Status_t MD_InitTableServices(void) uint8 TblIndex; bool RecoveredValidTable = true; /* for current table */ bool TableInitValidFlag = true; /* for all tables so far*/ - MD_DwellTableLoad_t InitMemDwellTable; - MD_DwellTableLoad_t *MD_LoadTablePtr = NULL; - uint16 TblRecos = 0; /* Number of Tables Recovered */ - uint16 TblInits = 0; /* Number of Tables Initialized */ + MD_DwellTableLoad_t *MD_LoadTablePtr = NULL; + uint16 TblRecos = 0; /* Number of Tables Recovered */ + uint16 TblInits = 0; /* Number of Tables Initialized */ char TblFileName[OS_MAX_PATH_LEN]; - /* Prepare Data Structure used for loading Initial Table Data */ - - memset(&InitMemDwellTable, 0, sizeof(InitMemDwellTable)); - /* ** For each table, load recovered data if available and valid. ** Otherwise, load initial data.