Dead code checking for `CFE_ES_RunStatus_SYS_EXCEPTION` and `NULL` `bufptr`
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 36
- Forks
- 41
- Avg merge
- 11d 19h
- Merged PRs (30d)
- 2
Description
Checklist
- I reviewed the Contributing Guide.
- 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
-
bufptrcannot beNULL(this is guaranteed byCFE_SB_ReceiveBufferif the return value isCFE_SUCCESS):
https://github.com/nasa/CS/blob/f958cc0999fc3dfc76da63478defeed36a6e492d/fsw/src/cs_app.c#L86-L91 -
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in fsw/src/cs_app.c at the two sections linked in the issue, around lines 86-91 and 119. Review the receive-buffer handling and the run-status check, then remove the dead or unnecessary code identified there. Done means the obsolete checks are gone without changing the successful receive behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100