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.
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 blockif(!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.