Skip to content

Commit

Permalink
Fix nasa#705, Use cFE defines to size arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Sep 22, 2020
1 parent 60917a2 commit 389e5e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions fsw/cfe-core/src/inc/cfe_es.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
/** \{ */
/** Maximum length allowed for CDS name. <BR>
** NOTE: "+2" is for NULL Character and "." (i.e. - "AppName.CDSName") */
#define CFE_ES_CDS_MAX_FULL_NAME_LEN (CFE_MISSION_ES_CDS_MAX_NAME_LENGTH + OS_MAX_API_NAME + 2)
#define CFE_ES_CDS_MAX_FULL_NAME_LEN (CFE_MISSION_ES_CDS_MAX_NAME_LENGTH + CFE_MISSION_MAX_API_LEN + 2)

#define CFE_ES_CDS_BAD_HANDLE (CFE_ES_CDSHandle_t) 0xFFFF
/** \} */
Expand Down Expand Up @@ -215,11 +215,11 @@ typedef struct CFE_ES_AppInfo
uint32 Type; /**< \cfetlmmnemonic \ES_APPTYPE
\brief The type of App: CORE or EXTERNAL */

char Name[OS_MAX_API_NAME]; /**< \cfetlmmnemonic \ES_APPNAME
char Name[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \ES_APPNAME
\brief The Registered Name of the Application */
char EntryPoint[OS_MAX_API_NAME]; /**< \cfetlmmnemonic \ES_APPENTRYPT
char EntryPoint[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \ES_APPENTRYPT
\brief The Entry Point label for the Application */
char FileName[OS_MAX_PATH_LEN]; /**< \cfetlmmnemonic \ES_APPFILENAME
char FileName[CFE_MISSION_MAX_PATH_LEN]; /**< \cfetlmmnemonic \ES_APPFILENAME
\brief The Filename of the file containing the Application */

uint32 StackSize; /**< \cfetlmmnemonic \ES_STACKSIZE
Expand Down Expand Up @@ -251,7 +251,7 @@ typedef struct CFE_ES_AppInfo
\brief The Application's Main Task ID */
uint32 ExecutionCounter; /**< \cfetlmmnemonic \ES_MAINTASKEXECNT
\brief The Application's Main Task Execution Counter */
char MainTaskName[OS_MAX_API_NAME]; /**< \cfetlmmnemonic \ES_MAINTASKNAME
char MainTaskName[CFE_MISSION_MAX_API_LEN]; /**< \cfetlmmnemonic \ES_MAINTASKNAME
\brief The Application's Main Task ID */
uint32 NumOfChildTasks; /**< \cfetlmmnemonic \ES_CHILDTASKS
\brief Number of Child tasks for an App */
Expand All @@ -263,11 +263,11 @@ typedef struct CFE_ES_AppInfo
*/
typedef struct CFE_ES_TaskInfo
{
uint32 TaskId; /**< \brief Task Id */
uint32 ExecutionCounter; /**< \brief Task Execution Counter */
uint8 TaskName[OS_MAX_API_NAME]; /**< \brief Task Name */
uint32 AppId; /**< \brief Parent Application ID */
uint8 AppName[OS_MAX_API_NAME]; /**< \brief Parent Application Name */
uint32 TaskId; /**< \brief Task Id */
uint32 ExecutionCounter; /**< \brief Task Execution Counter */
uint8 TaskName[CFE_MISSION_MAX_API_LEN]; /**< \brief Task Name */
uint32 AppId; /**< \brief Parent Application ID */
uint8 AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Parent Application Name */

} CFE_ES_TaskInfo_t;

Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/inc/cfe_tbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ typedef struct CFE_TBL_Info
bool DoubleBuffered; /**< \brief Flag indicating Table has a dedicated inactive buffer */
bool UserDefAddr; /**< \brief Flag indicating Table address was defined by Owner Application */
bool Critical; /**< \brief Flag indicating Table contents are maintained in a CDS */
char LastFileLoaded[OS_MAX_PATH_LEN]; /**< \brief Filename of last file loaded into table */
char LastFileLoaded[CFE_MISSION_MAX_PATH_LEN]; /**< \brief Filename of last file loaded into table */
} CFE_TBL_Info_t;

/*************************** Function Prototypes ******************************/
Expand Down

0 comments on commit 389e5e0

Please sign in to comment.