summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
commit7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch)
tree6bd24199653eff3e99f312d748ba4909686bef61 /src/H5Pdcpl.c
parent8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff)
parent2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff)
downloadhdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2
[svn-r28636] merge from trunk.
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 0677517..afef06b 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -769,12 +769,16 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2,
HDassert(size == sizeof(H5O_layout_t));
/* Check for different layout type */
- if(layout1->type < layout2->type) HGOTO_DONE(-1)
- if(layout1->type > layout2->type) HGOTO_DONE(1)
+ if(layout1->type < layout2->type)
+ HGOTO_DONE(-1)
+ if(layout1->type > layout2->type)
+ HGOTO_DONE(1)
/* Check for different layout version */
- if(layout1->version < layout2->version) HGOTO_DONE(-1)
- if(layout1->version > layout2->version) HGOTO_DONE(1)
+ if(layout1->version < layout2->version)
+ HGOTO_DONE(-1)
+ if(layout1->version > layout2->version)
+ HGOTO_DONE(1)
/* Compare non-dataset-specific fields in layout info */
switch(layout1->type) {
@@ -787,13 +791,17 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2,
unsigned u; /* Local index variable */
/* Check the number of dimensions */
- if(layout1->u.chunk.ndims < layout2->u.chunk.ndims) HGOTO_DONE(-1)
- if(layout1->u.chunk.ndims > layout2->u.chunk.ndims) HGOTO_DONE(1)
+ if(layout1->u.chunk.ndims < layout2->u.chunk.ndims)
+ HGOTO_DONE(-1)
+ if(layout1->u.chunk.ndims > layout2->u.chunk.ndims)
+ HGOTO_DONE(1)
/* Compare the chunk dims */
for(u = 0; u < layout1->u.chunk.ndims - 1; u++) {
- if(layout1->u.chunk.dim[u] < layout2->u.chunk.dim[u]) HGOTO_DONE(-1)
- if(layout1->u.chunk.dim[u] > layout2->u.chunk.dim[u]) HGOTO_DONE(1)
+ if(layout1->u.chunk.dim[u] < layout2->u.chunk.dim[u])
+ HGOTO_DONE(-1)
+ if(layout1->u.chunk.dim[u] > layout2->u.chunk.dim[u])
+ HGOTO_DONE(1)
} /* end for */
} /* end case */
break;
@@ -2133,7 +2141,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
H5O_storage_virtual_ent_t *old_list = NULL; /* List pointer previously on property list */
H5O_storage_virtual_ent_t *ent = NULL; /* Convenience pointer to new VDS entry */
hbool_t retrieved_layout = FALSE; /* Whether the layout has been retrieved */
- hbool_t adding_entry = FALSE; /* Whether we are in the middle of adding an entry */
hbool_t free_list = FALSE; /* Whether to free the list of virtual entries */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2207,7 +2214,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
if(NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
- adding_entry = TRUE;
if(NULL == (ent->source_file_name = HDstrdup(src_file_name)))
HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name")
if(NULL == (ent->source_dset_name = HDstrdup(src_dset_name)))