summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-09-22 00:26:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-09-22 00:26:51 (GMT)
commitfb238c24a5c6679c7555c95f887b7f4a49dbb640 (patch)
treef3d4107271fa1c56c9a9beae272653acb95d5527 /src/H5Shyper.c
parent0be8c1687945eb0e55fac84c7aa9901ca9898a26 (diff)
downloadhdf5-fb238c24a5c6679c7555c95f887b7f4a49dbb640.zip
hdf5-fb238c24a5c6679c7555c95f887b7f4a49dbb640.tar.gz
hdf5-fb238c24a5c6679c7555c95f887b7f4a49dbb640.tar.bz2
[svn-r27849] Description:
Normalize against incoming changes on VDS branch. Tested on: MacOSX/64 10.10.5 (amazon) w/serial (h5committest forthcoming)
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 12e23fa..6b943d3 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -1994,7 +1994,8 @@ H5S_hyper_serial_size(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **p)
+H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans,
+ hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **p)
{
H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */
hsize_t u; /* Index variable */
@@ -2091,7 +2092,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p)
HDassert(space);
/* Store the preamble information */
- UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
+ UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */
UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */
lenp = *p; /* keep the pointer to the length location for later */
@@ -2235,7 +2236,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S_hyper_deserialize (H5S_t *space, const uint8_t **p)
+H5S_hyper_deserialize(H5S_t *space, const uint8_t **p)
{
unsigned rank; /* rank of points */
size_t num_elem=0; /* number of elements in selection */
@@ -3194,13 +3195,15 @@ H5S_hyper_release(H5S_t *space)
space->select.num_elem = 0;
/* Release irregular hyperslab information */
- if(space->select.sel_info.hslab->span_lst != NULL) {
- if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
- } /* end if */
+ if(space->select.sel_info.hslab) {
+ if(space->select.sel_info.hslab->span_lst != NULL) {
+ if(H5S_hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans")
+ } /* end if */
- /* Release space for the hyperslab selection information */
- space->select.sel_info.hslab = H5FL_FREE(H5S_hyper_sel_t, space->select.sel_info.hslab);
+ /* Release space for the hyperslab selection information */
+ space->select.sel_info.hslab = H5FL_FREE(H5S_hyper_sel_t, space->select.sel_info.hslab);
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -7134,12 +7137,12 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
if(H5S_hyper_generate_spans(space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree")
+ /* Indicate that the regular dimensions are no longer valid */
+ space->select.sel_info.hslab->diminfo_valid = FALSE;
+
/* Add in the new hyperslab information */
if(H5S_generate_hyperslab (space, op, start, opt_stride, opt_count, opt_block)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs")
-
- /* Indicate that the regular dimensions are no longer valid */
- space->select.sel_info.hslab->diminfo_valid=FALSE;
} /* end if */
else
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation")