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 #384, Update status variables (0, -1) to their defined macros #385

Conversation

thnkslprpt
Copy link
Contributor

Checklist

Describe the contribution

Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).

Expected behavior changes
No change.
Improves expressiveness.

Contributor Info
Avi Weiss @thnkslprpt

@@ -299,7 +299,7 @@
if (ret == CFE_SUCCESS)
{
/* Verify CRC */
if (CF_CFDP_R_CheckCrc(t, crc) == 0)
if (CF_CFDP_R_CheckCrc(t, crc) == CFE_SUCCESS)

Check warning

Code scanning / CodeQL

Side effect in a Boolean expression

This Boolean expression is not side-effect free.
@@ -497,7 +497,7 @@
/* this function is only invoked for NAK PDU types */
nak = &ph->int_header.nak;

if (CF_CFDP_RecvNak(t, ph) == 0 && nak->segment_list.num_segments > 0)
if (CF_CFDP_RecvNak(t, ph) == CFE_SUCCESS && nak->segment_list.num_segments > 0)

Check warning

Code scanning / CodeQL

Side effect in a Boolean expression

This Boolean expression is not side-effect free.
@dzbaker dzbaker requested a review from havencarlson May 18, 2023 18:32
@thnkslprpt thnkslprpt force-pushed the fix-384-update-status-variables-to-defined-macros branch from 97ceb9d to 79f7e4e Compare May 19, 2023 01:15
@dzbaker dzbaker merged commit 0f18ae4 into nasa:main May 25, 2023
@thnkslprpt thnkslprpt deleted the fix-384-update-status-variables-to-defined-macros branch May 25, 2023 20:03
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Magic number status variables (0, -1) can be updated to their defined macros
5 participants