From: Martin Quinson Date: Mon, 12 Dec 2016 14:23:13 +0000 (+0100) Subject: these are redundent tests of which we already have the answer X-Git-Tag: v3_14~67 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f9629b903536da09a11809f9a61a9dda0726f30e these are redundent tests of which we already have the answer --- diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index dc589718ec..a1a0859c65 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -499,7 +499,7 @@ int PMPI_Group_excl(MPI_Group group, int n, int *ranks, MPI_Group * newgroup) } else { if (n == 0) { *newgroup = group; - if(group!= smpi_comm_group(MPI_COMM_WORLD) && group != MPI_GROUP_NULL + if (group != smpi_comm_group(MPI_COMM_WORLD) && group != smpi_comm_group(MPI_COMM_SELF) && group != MPI_GROUP_EMPTY) smpi_group_use(group); } else if (n == smpi_group_size(group)) { @@ -602,7 +602,7 @@ int PMPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group * n } else { if (n == 0) { *newgroup = group; - if(group!= smpi_comm_group(MPI_COMM_WORLD) && group != MPI_GROUP_NULL + if (group!= smpi_comm_group(MPI_COMM_WORLD) && group != smpi_comm_group(MPI_COMM_SELF) && group != MPI_GROUP_EMPTY) smpi_group_use(group); } else { @@ -1346,7 +1346,7 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status) smpi_empty_status(status); retval = MPI_SUCCESS; } else { - int rank = (request!=nullptr && (*request)->comm != MPI_COMM_NULL) ? smpi_process_index() : -1; + int rank = ((*request)->comm != MPI_COMM_NULL) ? smpi_process_index() : -1; instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1); extra->type = TRACING_TEST; diff --git a/src/xbt/cunit.cpp b/src/xbt/cunit.cpp index bc18da41a0..e699c8502f 100644 --- a/src/xbt/cunit.cpp +++ b/src/xbt/cunit.cpp @@ -583,7 +583,7 @@ int xbt_test_run(char *selection, int verbosity) ? ((1 - (double) _xbt_test_unit_failed / (double) _xbt_test_nb_units) * 100.0) : 100.0, _xbt_test_nb_units); first = 1; if (_xbt_test_nb_units != _xbt_test_unit_failed) { - fprintf(stderr, "%s%d ok", (first ? "" : ", "), _xbt_test_nb_units - _xbt_test_unit_failed); + fprintf(stderr, "%d ok", _xbt_test_nb_units - _xbt_test_unit_failed); first = 0; } if (_xbt_test_unit_failed) { @@ -597,7 +597,7 @@ int xbt_test_run(char *selection, int verbosity) ? ((1 - (double) _xbt_test_test_failed / (double) _xbt_test_nb_tests) * 100.0) : 100.0, _xbt_test_nb_tests); first = 1; if (_xbt_test_nb_tests != _xbt_test_test_failed) { - fprintf(stderr, "%s%d ok", (first ? "" : ", "), _xbt_test_nb_tests - _xbt_test_test_failed); + fprintf(stderr, "%d ok", _xbt_test_nb_tests - _xbt_test_test_failed); first = 0; } if (_xbt_test_test_failed) {