summaryrefslogtreecommitdiffstats
path: root/src/H5Spoint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-09-06 15:44:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-09-06 15:44:07 (GMT)
commite5deb6dbba6103836e34c27bbef3d075ceb4bb01 (patch)
treef4de2bf4812d7cce25330440d45849cf980553f4 /src/H5Spoint.c
parent24b64938a191c03e7a29f9a8924c96aa47444124 (diff)
downloadhdf5-e5deb6dbba6103836e34c27bbef3d075ceb4bb01.zip
hdf5-e5deb6dbba6103836e34c27bbef3d075ceb4bb01.tar.gz
hdf5-e5deb6dbba6103836e34c27bbef3d075ceb4bb01.tar.bz2
[svn-r2511] Fix point selections so they work properly with both staticly and dynamicly
allocated memory.
Diffstat (limited to 'src/H5Spoint.c')
-rw-r--r--src/H5Spoint.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 7cd56bf..e8e3dbf 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -126,10 +126,9 @@ H5S_point_init (const struct H5O_layout_t UNUSED *layout,
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hssize_t **_coord)
+herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hssize_t **coord)
{
H5S_pnt_node_t *top, *curr, *new; /* Point selection nodes */
- const hssize_t *coord=(const hssize_t *)_coord; /* Pointer to the actual coordinates */
uintn i; /* Counter */
herr_t ret_value=FAIL; /* return value */
@@ -162,7 +161,7 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss
#endif /* QAK */
/* Copy over the coordinates */
- HDmemcpy(new->pnt,coord+(i*space->extent.u.simple.rank),(space->extent.u.simple.rank*sizeof(hssize_t)));
+ HDmemcpy(new->pnt,*coord+(i*space->extent.u.simple.rank),(space->extent.u.simple.rank*sizeof(hssize_t)));
#ifdef QAK
printf("%s: check 1.3\n",FUNC);
{
@@ -172,7 +171,7 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss
printf("%s: pnt[%d]=%d\n",FUNC,(int)j,(int)new->pnt[j]);
printf("%s: coord[%d][%d]=%d\n",
FUNC, (int)i, (int)j,
- (int)*(coord+(i*space->extent.u.simple.rank)+j));
+ (int)**(coord+(i*space->extent.u.simple.rank)+j));
}
}
#endif /* QAK */