diff options
-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 */ |