Skip to content

ES uncovered branch in CFE_ES_TaskEntryPoint, conditions not independent (defensive code) #1925

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
Uncovered branch since RealEntryFunc always != NULL when CFE_ES_GetTaskFunction returns CFE_SUCCESS:

     561                 :          4 : void CFE_ES_TaskEntryPoint(void)
     562                 :            : {
     563                 :            :     CFE_ES_TaskEntryFuncPtr_t RealEntryFunc;
     564                 :            : 
     565 [ +  + ][ +  - ]:          4 :     if (CFE_ES_GetTaskFunction(&RealEntryFunc) == CFE_SUCCESS && RealEntryFunc != NULL)

here:

void CFE_ES_TaskEntryPoint(void)
{
CFE_ES_TaskEntryFuncPtr_t RealEntryFunc;
if (CFE_ES_GetTaskFunction(&RealEntryFunc) == CFE_SUCCESS && RealEntryFunc != NULL)

Describe the solution you'd like
If CFE_ES_GetTaskFunction was stubbed this could be exercised (or alternate implementation). These are both internal functions so really doesn't require a NULL check.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions