Skip to content

RecomputeInProgress checked for false and then immediately assigned false #101

@thnkslprpt

Description

@thnkslprpt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions