X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/04cb8833befbe07b6b94ff0cae98bc17b78724e3..1c8c73ef7e2f1307c815cd11071f8c584436f9d5:/src/smpi/smpi_group.cpp diff --git a/src/smpi/smpi_group.cpp b/src/smpi/smpi_group.cpp index f12c5cfa7c..a7e56babcb 100644 --- a/src/smpi/smpi_group.cpp +++ b/src/smpi/smpi_group.cpp @@ -64,12 +64,10 @@ Group::~Group() void Group::set_mapping(int index, int rank) { - int * val_rank; - if (rank < size_) { rank_to_index_map_[rank] = index; if (index!=MPI_UNDEFINED ) { - val_rank = static_cast(xbt_malloc(sizeof(int))); + int* val_rank = static_cast(xbt_malloc(sizeof(int))); *val_rank = rank; char * key = bprintf("%d", index); @@ -124,18 +122,15 @@ int Group::size() int Group::compare(MPI_Group group2) { int result; - int i; - int index; - int rank; result = MPI_IDENT; if (size_ != group2->size()) { result = MPI_UNEQUAL; } else { int sz = group2->size(); - for (i = 0; i < sz; i++) { - index = this->index(i); - rank = group2->rank(index); + for (int i = 0; i < sz; i++) { + int index = this->index(i); + int rank = group2->rank(index); if (rank == MPI_UNDEFINED) { result = MPI_UNEQUAL; break;