-
Notifications
You must be signed in to change notification settings - Fork 47
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 #455, Convert suitable 0
/1
variables to bool
type
#456
Fix #455, Convert suitable 0
/1
variables to bool
type
#456
Conversation
@@ -689,7 +689,7 @@ | |||
if (success && txn->state_data.receive.r2.rx_crc_calc_bytes == txn->fsize) | |||
{ | |||
/* all bytes calculated, so now check */ | |||
if (!CF_CFDP_R_CheckCrc(txn, txn->state_data.receive.r2.eof_crc)) | |||
if (CF_CFDP_R_CheckCrc(txn, txn->state_data.receive.r2.eof_crc) == CFE_SUCCESS) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
@@ -981,14 +981,14 @@ | |||
* See description in cf_cmd.h for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) | |||
void CF_GetSetParamCmd(bool is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -981,14 +981,14 @@ | |||
* See description in cf_cmd.h for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
void CF_GetSetParamCmd(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) | |||
void CF_GetSetParamCmd(bool is_set, CF_GetSet_ValueID_t param_id, uint32 value, uint8 chan_num) |
Check notice
Code scanning / CodeQL
Function too long Note
Thanks @thnkslprpt for these contributions! I'd like to get our team to review this one next week; would you be able to resolve the conflicts? |
e029f03
to
0b1be18
Compare
Updated @dzbaker |
@@ -1586,7 +1586,7 @@ | |||
* See description in cf_cfdp.h for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
void CF_CFDP_ResetTransaction(CF_Transaction_t *txn, int keep_history) | |||
void CF_CFDP_ResetTransaction(CF_Transaction_t *txn, bool keep_history) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -1586,7 +1586,7 @@ | |||
* See description in cf_cfdp.h for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
void CF_CFDP_ResetTransaction(CF_Transaction_t *txn, int keep_history) | |||
void CF_CFDP_ResetTransaction(CF_Transaction_t *txn, bool keep_history) |
Check notice
Code scanning / CodeQL
Function too long Note
Checklist
Describe the contribution
0
/1
variables tobool
type #455int
variables being used to represent boolean truth values (on/off, true/false) to use the actualbool
type - improving the clarity of the code.inc
folderTesting performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).
Expected behavior changes
Effectively no change to behavior (these
int
variables were already being used as boolean truth values).System(s) tested on
Debian GNU/Linux 11 (bullseye)
Current main branch of cFS bundle.
Contributor Info
Avi Weiss @thnkslprpt