Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2282, Move calls to CFE_SB_GetPipeName() up higher to reduce duplication #2283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Apr 5, 2023

Checklist

Describe the contribution

The PipeName is now ready to use in any of the error blocks if needed.

Testing performed
GitHub CI actions all passing successfully.

A couple of the coverage tests which were checking the error conditions but suppressing the actual sending of an event now have the extra event generated by CFE_SB_GetPipeName() from earlier in the for block.

#2265 will remove the event from nominal execution of CFE_SB_GetPipeName() anyway, so these event counts will go back down once that is merged (also the call will no longer be 'indirectly recursive').

Expected behavior changes
No change to behavior other than that described above.

Contributor Info
Avi Weiss @thnkslprpt

@@ -1676,13 +1676,13 @@
/* send an event for each pipe write error that may have occurred */
for (i = 0; i < SBSndErr.EvtsToSnd; i++)
{
CFE_SB_GetPipeName(PipeName, sizeof(PipeName), SBSndErr.EvtBuf[i].PipeId);

Check warning

Code scanning / CodeQL

Uses of recursion

The function CFE_SB_BroadcastBufferToRoute is indirectly recursive via this call to [CFE_SB_GetPipeName](1). The function CFE_SB_BroadcastBufferToRoute is indirectly recursive via this call to [CFE_SB_GetPipeName](2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move calls to GetPipeName() to reduce code duplication in BroadcastBufferToRoute()
1 participant