nasa / nasa/CS

`CS_GetEntryIDEepromCmd` can be simplified by removing redundant variables

Open
#107 0 comments 0 reactions 0 assignees View on GitHub

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
The StartOfResultsTable and ResultsEntry are only used in a single if condition - unnecessary variables make the code more complicated and harder to test.

Code snips
https://github.com/nasa/CS/blob/f958cc0999fc3dfc76da63478defeed36a6e492d/fsw/src/cs_eeprom_cmds.c#L346-L376

Expected behavior
Remove redundant variables.

Reporter Info
Avi Weiss   @thnkslprpt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in fsw/src/cs_eeprom_cmds.c around lines 346-376, where the issue identifies StartOfResultsTable and ResultsEntry. Confirm how the single if condition uses them and verify that the behavior remains unchanged after the redundant variables are removed.

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
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.