`CS_RecomputeBaselineMemoryCmd` can be simplified by initializing `State` to `CS_STATE_UNDEFINED`
Open
Nobody has claimed this yet.
enhancement
- 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
State is only used in one event message, and initializing to CS_STATE_UNDEFINED would simplify the if/else before the event is sent.
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
Read fsw/src/cs_memory_cmds.c around lines 146-216 and trace the single event-message use of State. Done means State is initialized to CS_STATE_UNDEFINED, the preceding conditional is simplified as described, and the relevant CS checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100