The checks if (nb_handle) imply that this argument can be NULL. However, SAMECLUSNODE unconditionally dereferences this pointer, so it cannot be NULL.
This code should be cleaned up to do at most one NULL check on the argument. I might work on this at some point.
int PARMCI_Wait(armci_hdl_t* usr_hdl)
{
armci_ihdl_t nb_handle = (armci_ihdl_t)usr_hdl;
int success=0;
int direct = SAMECLUSNODE(nb_handle->proc);
if(direct) {
return(success);
}
if(nb_handle) {
if(nb_handle->agg_flag) {
armci_agg_complete(nb_handle, UNSET);
return (success);
}
}
if(nb_handle){
The checks
if (nb_handle)imply that this argument can beNULL. However,SAMECLUSNODEunconditionally dereferences this pointer, so it cannot beNULL.This code should be cleaned up to do at most one
NULLcheck on the argument. I might work on this at some point.