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

CF CF_CFDP_MsgOutGet method double checks msg for NULL #29

Closed
jphickey opened this issue Nov 23, 2021 · 1 comment · Fixed by #137
Closed

CF CF_CFDP_MsgOutGet method double checks msg for NULL #29

jphickey opened this issue Nov 23, 2021 · 1 comment · Fixed by #137
Milestone

Comments

@jphickey
Copy link
Contributor

This issue was imported from the GSFC issue tracking system

Imported from: [GSFCCFS-1727] CF CF_CFDP_MsgOutGet method double checks msg for NULL
Originally submitted by: Gibson, Alan S. (GSFC-5870) on Mon Sep 13 09:59:14 2021

Original Description:
The function CF_CFDP_MsgOutGet in cf_cfdp.c checks if(!CF_AppData.engine.out.msg) (line 356) as a top if block; however, it then checks it again as part of the if block
if(!CF_AppData.engine.out.msg&&((CF_AppData.config_table->chan[t->chan_num].sem_name[0]&&                     (OS_CountSemTimedWait(c->sem_id, 0)==OS_SUCCESS))||                     (!CF_AppData.config_table->chan[t->chan_num].sem_name[0])))
(starting on line 365 <- yep not a typo line 356 and 365, funny), but there is nothing in between that could change it.

It would appear that this check in the second if is not required.

@jphickey
Copy link
Contributor Author

jphickey commented Jan 6, 2022

This was cleaned up as part of moving this code to a separate file (cf_cfdp_sbintf.c) as part of #137.

@skliper skliper added this to the Draco milestone Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants