From 57bdb323b0fc9daf7870f09629ef759e549f867e Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 12 Jun 2006 19:38:52 +0000 Subject: [PATCH] Initialize the extent before using it. This commit was SVN r10309. --- ompi/mpi/c/type_create_subarray.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/c/type_create_subarray.c b/ompi/mpi/c/type_create_subarray.c index 22b6828b4f..3567423bb3 100644 --- a/ompi/mpi/c/type_create_subarray.c +++ b/ompi/mpi/c/type_create_subarray.c @@ -66,6 +66,9 @@ int MPI_Type_create_subarray(int ndims, } } } + + ompi_ddt_type_extent( oldtype, &extent ); + /* If the ndims is zero then return the NULL datatype */ if( ndims < 2 ) { if( 0 == ndims ) { @@ -87,8 +90,6 @@ int MPI_Type_create_subarray(int ndims, end_loop = ndims - 1; } - ompi_ddt_type_extent( oldtype, &extent ); - /* 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.