summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c4
-rw-r--r--src/H5Smpio.c9
2 files changed, 5 insertions, 8 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 24efd72..443f800 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1181,7 +1181,7 @@ H5A_rename(H5G_entry_t *ent, char *old_name, char *new_name)
{
int seq, idx=FAIL; /* Index of attribute being querried */
H5A_t *found_attr; /* Attribute with OLD_NAME */
- herr_t ret_value; /* Return value */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5A_rename, FAIL);
@@ -1227,7 +1227,7 @@ H5A_rename(H5G_entry_t *ent, char *old_name, char *new_name)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to update attribute header messages");
/* Close the attribute */
- if(found_attr) H5A_close(found_attr);
+ H5A_close(found_attr);
done:
FUNC_LEAVE(ret_value);
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index c4996a4..9b3f132 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -721,10 +721,6 @@ H5S_mpio_space_type( const H5S_t *space, size_t elmt_size, hbool_t prefer_derive
/* Creat MPI type based on the kind of selection */
switch (space->extent.type) {
case H5S_SCALAR:
- /* not yet implemented */
- ret_value = FAIL;
- break;
-
case H5S_SIMPLE:
switch(space->select.type) {
case H5S_SEL_NONE:
@@ -1039,8 +1035,9 @@ H5S_mpio_opt_possible( const H5S_t *mem_space, const H5S_t *file_space, const un
assert(mem_space);
assert(file_space);
- /* Check whether these are both simple dataspaces */
- if (H5S_SIMPLE!=mem_space->extent.type || H5S_SIMPLE!=file_space->extent.type)
+ /* Check whether these are both simple or scalar dataspaces */
+ if (!((H5S_SIMPLE==mem_space->extent.type || H5S_SCALAR==mem_space->extent.type)
+ && (H5S_SIMPLE==file_space->extent.type || H5S_SCALAR==file_space->extent.type)))
HGOTO_DONE(FALSE);
/* Check whether both selections are "regular" */