CS icon indicating copy to clipboard operation
CS copied to clipboard

Dead code checking for `CFE_ES_RunStatus_SYS_EXCEPTION` and `NULL` `bufptr`

Open thnkslprpt opened this issue 1 year ago • 0 comments

Checklist

  • [x] I reviewed the Contributing Guide.
  • [x] I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug There are a couple of minor sections of dead/unnecessary code in CS.

Code snips

  1. bufptr cannot be NULL (this is guaranteed by CFE_SB_ReceiveBuffer if the return value is CFE_SUCCESS): https://github.com/nasa/CS/blob/f958cc0999fc3dfc76da63478defeed36a6e492d/fsw/src/cs_app.c#L86-L91

  2. Apparently code was removed that set the run status to CFE_ES_RunStatus_SYS_EXCEPTION, but this check was left in: https://github.com/nasa/CS/blob/f958cc0999fc3dfc76da63478defeed36a6e492d/fsw/src/cs_app.c#L119

Expected behavior Remove dead code to reduce unnecessary clutter.

Reporter Info Avi Weiss   @thnkslprpt

thnkslprpt avatar Oct 12 '24 14:10 thnkslprpt