mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
checking return value for HDF5 function call
This commit is contained in:
parent
8dc1ffea38
commit
c1ffb92a7f
@ -1325,12 +1325,17 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name)
|
||||
return NC_ENOMEM;
|
||||
type->format_type_info = hdf5_type;
|
||||
|
||||
/* Remember common info about this type. */
|
||||
type->committed = NC_TRUE;
|
||||
/* Remember HDF5-specific type info. */
|
||||
hdf5_type->hdf_typeid = hdf_typeid;
|
||||
H5Iinc_ref(hdf5_type->hdf_typeid); /* Increment number of objects using ID */
|
||||
hdf5_type->native_hdf_typeid = native_typeid;
|
||||
|
||||
/* Remember we have committed this type. */
|
||||
type->committed = NC_TRUE;
|
||||
|
||||
/* Increment number of objects using ID. */
|
||||
if (H5Iinc_ref(hdf5_type->hdf_typeid) < 0)
|
||||
return NC_EHDFERR;
|
||||
|
||||
/* What is the class of this type, compound, vlen, etc. */
|
||||
if ((class = H5Tget_class(hdf_typeid)) < 0)
|
||||
return NC_EHDFERR;
|
||||
|
Loading…
Reference in New Issue
Block a user