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

Return value of CFE_MSG_GetMsgId is not checked during ProcessCommandPacket or VerifyCmdLength #159

Open
asgibson opened this issue Oct 21, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@asgibson
Copy link

Describe the bug
CFE_MSG_GetMsgId returns a status value to indicate success or failure of the call, but neither of the usages in the sample app check if it is successful nor do they state that the return value is ignored by design.

To Reproduce
N/A

Expected behavior
Sample app should either make use of the return value to verify success or should note the reason why this is not being done.

Code snips

CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MsgId);

CFE_MSG_GetMsgId(MsgPtr, &MsgId);

System observed on:
N/A

Reporter Info
Alan Gibson NASA/GSFC 587

@skliper skliper added the enhancement New feature or request label Oct 21, 2021
@thnkslprpt
Copy link
Contributor

thnkslprpt commented Oct 18, 2022

I don't know if any change is necessary here. Most uses of CFE_MSG_GetMsgId ignore the return value, and purely use it for its functionality.

Nevertheless, if it's considered desirable to illustrate consideration of the return value, given that this is the sample app, a minimalistic solution (for the first case) might be:
Screenshot 2022-10-18 21 27 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants