diff options
-rw-r--r-- | src/H5Adeprec.c | 4 |
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 */ |