summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2014-10-20 02:42:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2014-10-20 02:42:36 (GMT)
commitf45faa4612c12e2db390550040b0d435bd6af350 (patch)
treee958743a4c94b3dae1d20679c3852d7c2b3a6153
parentda8344c06474d9e1f8eb2f9a343ac8c83660a56f (diff)
downloadhdf5-f45faa4612c12e2db390550040b0d435bd6af350.zip
hdf5-f45faa4612c12e2db390550040b0d435bd6af350.tar.gz
hdf5-f45faa4612c12e2db390550040b0d435bd6af350.tar.bz2
[svn-r25722] The return type of H5A_create was changed from hid_t to H5A_t *
but the test was not changed (still doing H5A_create(...) < 0). Fixed the error by changing to compare against NULL. Tested: ADA AIX machine where the old code was flagged as an error by the AIX compiler.
-rw-r--r--src/H5Adeprec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 124ce7c..247b4b5 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -183,10 +183,10 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Go do the real work for attaching the attribute to the dataset */
- if((attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id)) < 0)
+ if(NULL==(attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
/* Register the new attribute and get an ID for it */