Superfluous assignments, side-effects. type updates etc.
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
Some issues that can be easily cleaned up to improve readability and ease maintenance by simplifying the code.
- superfluous initializations (when the variable is immediately or always assigned a value before being used)
- side-effects in conditionals that can be easily removed and end up more readable
- a couple of types can be updated (
size_t,CFE_MSG_FcnCode_t)
Code snips
Can be size_t:
https://github.com/nasa/CS/blob/bd4dd1ce688e9af683e63132b37306b21f320ab2/fsw/inc/cs_tbldefs.h#L370
Can be CFE_MSG_FcnCode_t:
https://github.com/nasa/CS/blob/bd4dd1ce688e9af683e63132b37306b21f320ab2/fsw/src/cs_app.c#L268
Several functions with multiple CS calls that could be made clearer and more compliant with an additional Status/Result variable. e.g.:
https://github.com/nasa/CS/blob/bd4dd1ce688e9af683e63132b37306b21f320ab2/fsw/src/cs_app_cmds.c#L215-L241
Expected behavior
Clear up where it makes sense.
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 with fsw/inc/cs_tbldefs.h, fsw/src/cs_app.c, and fsw/src/cs_app_cmds.c at the linked locations. Review the surrounding code for unnecessary initializations, conditional side effects, type updates, and clearer status handling. Done means applying justified readability and maintenance cleanups while preserving behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100