From d50488297e2ff06f84a6067c7afa5b42117cf1a7 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 21 Jun 2016 15:00:35 +0200 Subject: [PATCH] don't protect only some paths against NULLity Either some or all. it makes sonarqube mad. --- examples/smpi/NAS/dt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/smpi/NAS/dt.c b/examples/smpi/NAS/dt.c index 341eaa28ba..55b29dd5e8 100644 --- a/examples/smpi/NAS/dt.c +++ b/examples/smpi/NAS/dt.c @@ -672,12 +672,12 @@ int main(int argc,char **argv ){ dg=buildSH(class); } - if(timer_on != 0 && dg && dg->numNodes+1>timers_tot){ + if(timer_on != 0 && dg->numNodes+1>timers_tot){ timer_on=0; if(my_rank==0) fprintf(stderr,"Not enough timers. Node timeing is off. \n"); } - if(dg && dg->numNodes>comm_size){ + if(dg->numNodes>comm_size){ if(my_rank==0){ fprintf(stderr,"** The number of MPI processes should not be less than \n"); fprintf(stderr,"** the number of nodes in the graph\n"); @@ -687,7 +687,7 @@ int main(int argc,char **argv ){ MPI_Finalize(); exit(0); } - for(i=0;inumNodes;i++){ + for(i=0; inumNodes; i++){ dg->node[i]->address=i; } if( my_rank == 0 ){ -- 2.20.1