summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-17 16:04:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-17 16:04:11 (GMT)
commitfd0355385132fd5450365863891996468bbbf9de (patch)
tree57374c8e7c9517ecc9165698664933ac4b8a4945
parent3c79ef173d810715836a38874f5d811c4e3e1259 (diff)
downloadhdf5-fd0355385132fd5450365863891996468bbbf9de.zip
hdf5-fd0355385132fd5450365863891996468bbbf9de.tar.gz
hdf5-fd0355385132fd5450365863891996468bbbf9de.tar.bz2
[svn-r8364] Purpose:
Code optimization Description: Remove redundant function call by re-using value we already know. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.9 (sleipnir) too minor to require h5committest
-rw-r--r--src/H5Dio.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 1df3b73..c4928e7 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -2349,15 +2349,19 @@ H5D_create_chunk_map(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *file_sp
/* Indicate that this space needs to be released */
equiv_mspace_init=1;
+
+ /* Set the number of dimensions for the memory dataspace */
+ fm->m_ndims=dataset->layout.ndims-1;
} /* end else */
- else
+ else {
equiv_mspace=(H5S_t *)mem_space; /* Casting away 'const' OK... */
+
+ /* Set the number of dimensions for the memory dataspace */
+ H5_ASSIGN_OVERFLOW(fm->m_ndims,sm_ndims,int,unsigned);
+ } /* end else */
/* Get dim number and dimensionality for each dataspace */
fm->f_ndims=f_ndims=dataset->layout.ndims-1;
- if((sm_ndims = H5S_get_simple_extent_ndims(equiv_mspace))<0)
- HGOTO_ERROR (H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number")
- H5_ASSIGN_OVERFLOW(fm->m_ndims,sm_ndims,int,unsigned);
if(H5S_get_simple_extent_dims(file_space, fm->f_dims, NULL)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality")