From: Arnaud Giersch Date: Mon, 19 Apr 2021 20:19:41 +0000 (+0200) Subject: Combine identical conditions. X-Git-Tag: v3.28~443 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8f3071249a8eb08a0e6c8f6822d21606076801db Combine identical conditions. --- diff --git a/examples/smpi/simple-execute/simple-execute.c b/examples/smpi/simple-execute/simple-execute.c index 1b5fb81cdd..fae01b8870 100644 --- a/examples/smpi/simple-execute/simple-execute.c +++ b/examples/smpi/simple-execute/simple-execute.c @@ -33,12 +33,10 @@ int main(int argc, char *argv[]) MPI_Finalize(); exit(0); } - if (0 == rank) { + if (rank == 0) { printf("\n *** Ping-pong test (MPI_Send/MPI_Recv) ***\n\n"); - } - /* start ping-pong tests between several pairs */ - if ( rank == 0) { + /* start ping-pong tests between several pairs */ int dst = 1; printf("[%d] About to send 1st message '%d' to process [%d]\n", rank, msg, dst); MPI_Send(&msg, 1, MPI_INT, dst, tag1, MPI_COMM_WORLD);