Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecomputeInProgress checked for false and then immediately assigned false #101

Open
2 tasks done
thnkslprpt opened this issue Nov 30, 2024 · 0 comments · May be fixed by #102
Open
2 tasks done

RecomputeInProgress checked for false and then immediately assigned false #101

thnkslprpt opened this issue Nov 30, 2024 · 0 comments · May be fixed by #102

Comments

@thnkslprpt
Copy link
Contributor

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
RecomputeInProgress checked for false and then immediately assigned false

Code snips

CS/fsw/src/cs_cmds.c

Lines 455 to 459 in f958cc0

if (CS_AppData.HkPacket.Payload.RecomputeInProgress == false &&
CS_AppData.HkPacket.Payload.OneShotInProgress == false)
{
/* There is no child task running right now, we can use it*/
CS_AppData.HkPacket.Payload.RecomputeInProgress = false;

CS/fsw/src/cs_cmds.c

Lines 526 to 534 in f958cc0

if (CS_AppData.HkPacket.Payload.RecomputeInProgress == false &&
CS_AppData.HkPacket.Payload.OneShotInProgress == true)
{
Status = CFE_ES_DeleteChildTask(CS_AppData.ChildTaskID);
if (Status == CFE_SUCCESS)
{
CS_AppData.ChildTaskID = CFE_ES_TASKID_UNDEFINED;
CS_AppData.HkPacket.Payload.RecomputeInProgress = false;

Expected behavior
Remove redundant assignment to simplify function.

Reporter Info
Avi Weiss   @thnkslprpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant