You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug TO_LAB_init contains 5 exit points - where possible this should be reduced to 1 (or maximum 2 if needed, for early exit after input-validation failure).
if (status!=CFE_SUCCESS&&status!=CFE_TBL_INFO_UPDATED)
{
CFE_EVS_SendEvent(TO_LAB_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't get table addr status %i",
__LINE__, (int)status);
returnstatus;
Also, the current logic doesn't contain early returns or status-guards after the first call to CFE_SB_CreatePipe, so subsequent initialization steps are attempted even if previous steps failed, and successful initialization is reported even if no pipes were created:
Checklist
Describe the bug
TO_LAB_init
contains 5 exit points - where possible this should be reduced to 1 (or maximum 2 if needed, for early exit after input-validation failure).to_lab/fsw/src/to_lab_app.c
Lines 117 to 155 in ec09026
Also, the current logic doesn't contain early returns or status-guards after the first call to
CFE_SB_CreatePipe
, so subsequent initialization steps are attempted even if previous steps failed, and successful initialization is reported even if no pipes were created:to_lab/fsw/src/to_lab_app.c
Lines 161 to 206 in ec09026
Expected behavior
Single exit point.
Reporter Info
Avi Weiss @thnkslprpt
The text was updated successfully, but these errors were encountered: