Skip to content

Dead code checking for CFE_ES_RunStatus_SYS_EXCEPTION and NULL bufptr #97

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
There are a couple of minor sections of dead/unnecessary code in CS.

Code snips

  1. bufptr cannot be NULL (this is guaranteed by CFE_SB_ReceiveBuffer if the return value is CFE_SUCCESS):

    CS/fsw/src/cs_app.c

    Lines 86 to 91 in f958cc0

    Result = CFE_SB_ReceiveBuffer(&BufPtr, CS_AppData.CmdPipe, CS_WAKEUP_TIMEOUT);
    /* Performance Log (start time counter) */
    CFE_ES_PerfLogEntry(CS_APPMAIN_PERF_ID);
    if ((Result == CFE_SUCCESS) && (BufPtr != NULL))

  2. Apparently code was removed that set the run status to CFE_ES_RunStatus_SYS_EXCEPTION, but this check was left in:

    if (CS_AppData.RunStatus == CFE_ES_RunStatus_APP_ERROR || CS_AppData.RunStatus == CFE_ES_RunStatus_SYS_EXCEPTION)

Expected behavior
Remove dead code to reduce unnecessary clutter.

Reporter Info
Avi Weiss   @thnkslprpt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions