diff --git a/src/H5Dint.c b/src/H5Dint.c index 37c9fe490a8..3b9d000f523 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -947,8 +947,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header"); /* Check for creating dataset with unusual datatype */ - if (H5T_is_numeric_with_unusual_unused_bits(type) && - !(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS))) + if (!(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS)) && + H5T_is_numeric_with_unusual_unused_bits(type)) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "creating dataset with unusual datatype, see documentation for " "H5Pset_relax_file_integrity_checks for details."); diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 64634aac405..4929be56717 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -212,8 +212,8 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for creating attribute with unusual datatype */ - if (H5T_is_numeric_with_unusual_unused_bits(attr->shared->dt) && - !(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(loc->file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS))) + if (!(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(loc->file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS)) && + H5T_is_numeric_with_unusual_unused_bits(attr->shared->dt)) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "creating attribute with unusual datatype, see documentation for " "H5Pset_relax_file_integrity_checks for details."); diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 2e23764fa7a..00a88984375 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -490,8 +490,8 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id) HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for creating committed datatype with unusual datatype */ - if (H5T_is_numeric_with_unusual_unused_bits(type) && - !(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS))) + if (!(H5O_has_chksum(oh) || (H5F_RFIC_FLAGS(file) & H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS)) && + H5T_is_numeric_with_unusual_unused_bits(type)) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "creating committed datatype with unusual datatype, see documentation for " "H5Pset_relax_file_integrity_checks for details.");