diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2014-10-20 02:39:58 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2014-10-20 02:39:58 (GMT) |
commit | b6e694cb329c684a6b63dba92613c0ff24b859d2 (patch) | |
tree | f612d36020732fb38e422f5cafdae86f78b95fe4 /src | |
parent | 2a668bd0fcd9c9374a43d72a279a80a05ce7b369 (diff) | |
download | hdf5-b6e694cb329c684a6b63dba92613c0ff24b859d2.zip hdf5-b6e694cb329c684a6b63dba92613c0ff24b859d2.tar.gz hdf5-b6e694cb329c684a6b63dba92613c0ff24b859d2.tar.bz2 |
[svn-r25721] 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Adeprec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 6342e18..247b4b5 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -186,7 +186,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, 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 */ |