No memset to zero-out the global data structure upon initialization.
CF checks the return value of the call to CFE_EVS_SendEvent() at the end of a successful initialization - not incorrect but unnecessary. Returns from CFE_EVS_SendEvent() are only checked a handful of times across cFS out of several thousand instances. Also, CF does not check returns from this function anywhere else in the source code.
https://github.com/nasa/CF/blob/0f18ae4b8f800afefdf60c97809c737289f46942/fsw/src/cf_app.c#L251-L257
Some other naming inconsistencies that could be updated to match standard cFS patterns such as common variables and function/command names also exist.
Expected behavior
Align with cFS where appropriate - consistency makes maintenance easier, and improves usability for consumers of cFS and the open-source apps.
Checklist
Describe the bug CF is the only app to still use
CFE_MSG_SetMsgTime()
to timestamp the HK packet, rather thanCFE_SB_TimeStampMsg()
: https://github.com/nasa/CF/blob/0f18ae4b8f800afefdf60c97809c737289f46942/fsw/src/cf_app.c#L47-L51No
memset
to zero-out the global data structure upon initialization.CF checks the return value of the call to
CFE_EVS_SendEvent()
at the end of a successful initialization - not incorrect but unnecessary. Returns fromCFE_EVS_SendEvent()
are only checked a handful of times across cFS out of several thousand instances. Also, CF does not check returns from this function anywhere else in the source code. https://github.com/nasa/CF/blob/0f18ae4b8f800afefdf60c97809c737289f46942/fsw/src/cf_app.c#L251-L257In
CF_AppMain()
, there is a check forCFE_SUCCESS
and for a null pointer of the buffer passed in toCFE_SB_ReceiveBuffer()
- this is guaranteed byCFE_SB_ReceiveBuffer()
to not be possible and is therefore unnecessary. cFE and almost all other apps do not do this. https://github.com/nasa/CF/blob/0f18ae4b8f800afefdf60c97809c737289f46942/fsw/src/cf_app.c#L336-L343Some other naming inconsistencies that could be updated to match standard cFS patterns such as common variables and function/command names also exist.
Expected behavior Align with cFS where appropriate - consistency makes maintenance easier, and improves usability for consumers of cFS and the open-source apps.
Reporter Info Avi Weiss @thnkslprpt