Skip to content

Commit

Permalink
Fix #145, Refactor mutually exclusive logic in if, else if block
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt authored and jphickey committed Nov 1, 2023
1 parent 20e4792 commit fce77cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,16 @@ int32 TO_LAB_init(void)
/* Only process until invalid MsgId is found*/
break;
}
else if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream))
{
status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags,
TO_LAB_Subs->Subs[i].BufLimit);
}

status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags,
TO_LAB_Subs->Subs[i].BufLimit);

if (status != CFE_SUCCESS)
{
CFE_EVS_SendEvent(TO_LAB_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR,
"L%d TO Can't subscribe to stream 0x%x status %i", __LINE__,
(unsigned int)CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream), (int)status);
}
}

/*
Expand Down

0 comments on commit fce77cf

Please sign in to comment.