From 756eee571e7a66297d2c5dc0043820915cda55ca Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 29 Aug 2007 02:02:19 +0000 Subject: [PATCH] Fix Coverty #24. This test didn't make sense in this branch of the if. This commit was SVN r16001. --- ompi/mpi/c/type_create_subarray.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ompi/mpi/c/type_create_subarray.c b/ompi/mpi/c/type_create_subarray.c index 0eb1957dd7..d8441d20ab 100644 --- a/ompi/mpi/c/type_create_subarray.c +++ b/ompi/mpi/c/type_create_subarray.c @@ -85,8 +85,6 @@ int MPI_Type_create_subarray(int ndims, start_loop = i = ndims - 1; step = -1; end_loop = -1; - if( end_loop > (start_loop + 2 * step) ) - end_loop = start_loop + 2 * step; } else { start_loop = i = 0; step = 1; @@ -95,9 +93,9 @@ int MPI_Type_create_subarray(int ndims, end_loop = start_loop + 2 * step; } - /* As we know that the ndims is at least 1 we can start by creating the first dimension data - * outside the loop, such that we dont have to create a duplicate of the oldtype just to be able - * to free it. + /* As we know that the ndims is at least 1 we can start by creating the + * first dimension data outside the loop, such that we dont have to create + * a duplicate of the oldtype just to be able to free it. */ ompi_ddt_create_vector( subsize_array[i+step], subsize_array[i], size_array[i], oldtype, newtype );