From cb1569728977b74da64aec4e7eea69c638c40e76 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 8 Sep 2020 07:51:18 -0700 Subject: [PATCH] mpi/status: trivial style fixes Add {} around all blocks, even 1-line blocks. No other code or logic changes. Signed-off-by: Jeff Squyres --- ompi/mpi/c/status_c2f.c | 3 ++- ompi/mpi/c/status_c2f08.c | 3 ++- ompi/mpi/c/status_f082c.c | 3 ++- ompi/mpi/c/status_f2c.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ompi/mpi/c/status_c2f.c b/ompi/mpi/c/status_c2f.c index f432a525678..3fc0fd9fe49 100644 --- a/ompi/mpi/c/status_c2f.c +++ b/ompi/mpi/c/status_c2f.c @@ -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; } diff --git a/ompi/mpi/c/status_c2f08.c b/ompi/mpi/c/status_c2f08.c index 92299d54687..9475d1beeba 100644 --- a/ompi/mpi/c/status_c2f08.c +++ b/ompi/mpi/c/status_c2f08.c @@ -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; } diff --git a/ompi/mpi/c/status_f082c.c b/ompi/mpi/c/status_f082c.c index 956ffb5036d..4c3deb24683 100644 --- a/ompi/mpi/c/status_f082c.c +++ b/ompi/mpi/c/status_f082c.c @@ -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; } diff --git a/ompi/mpi/c/status_f2c.c b/ompi/mpi/c/status_f2c.c index dfd2e249f15..a48e2697b60 100644 --- a/ompi/mpi/c/status_f2c.c +++ b/ompi/mpi/c/status_f2c.c @@ -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; }