Skip to content

Commit

Permalink
mpi/status: trivial style fixes
Browse files Browse the repository at this point in the history
Add {} around all blocks, even 1-line blocks.

No other code or logic changes.

Signed-off-by: Jeff Squyres <[email protected]>
  • Loading branch information
jsquyres committed Sep 8, 2020
1 parent 70e7368 commit cb15697
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ompi/mpi/c/status_c2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status)
get truncated). But if sizeof(int) == sizeof(INTEGER) or
sizeof(int) < sizeof(INTEGER), everything should be kosher. */
c_ints = (const int*)c_status;
for( i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int)); i++ )
for( i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int)); i++ ) {
f_status[i] = OMPI_INT_2_FINT(c_ints[i]);
}

return MPI_SUCCESS;
}
3 changes: 2 additions & 1 deletion ompi/mpi/c/status_c2f08.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ int MPI_Status_c2f08(const MPI_Status *c_status, MPI_F08_status *f08_status)
f08_status->MPI_TAG = OMPI_INT_2_FINT(c_status->MPI_TAG);
f08_status->MPI_ERROR = OMPI_INT_2_FINT(c_status->MPI_ERROR);
c_ints = (const int *)c_status + 3;
for(int i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int) - 3); i++ )
for(int i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int) - 3); i++ ) {
f08_status->internal[i] = OMPI_INT_2_FINT(c_ints[i]);
}

return MPI_SUCCESS;
}
3 changes: 2 additions & 1 deletion ompi/mpi/c/status_f082c.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ int MPI_Status_f082c(const MPI_F08_status *f08_status, MPI_Status *c_status)
c_status->MPI_TAG = (int)f08_status->MPI_TAG;
c_status->MPI_ERROR = (int)f08_status->MPI_ERROR;
c_ints = (int *)c_status + 3;
for(int i=0; i < (int)(sizeof(MPI_Status) / sizeof(int) - 3); i++)
for(int i=0; i < (int)(sizeof(MPI_Status) / sizeof(int) - 3); i++) {
c_ints[i] = (int)f08_status->internal[i];
}

return MPI_SUCCESS;
}
3 changes: 2 additions & 1 deletion ompi/mpi/c/status_f2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status)
We can't use OMPI_FINT_2_INT here because of some complications
with include files. :-( So just do the casting manually. */
c_ints = (int*)c_status;
for( i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int)); i++ )
for( i = 0; i < (int)(sizeof(MPI_Status) / sizeof(int)); i++ ) {
c_ints[i] = (int)f_status[i];
}

return MPI_SUCCESS;
}

0 comments on commit cb15697

Please sign in to comment.