diff options
Diffstat (limited to 'src/H5Ofill.c')
-rw-r--r-- | src/H5Ofill.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 99c8950..49cdd71 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -195,8 +195,8 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, FUNC_ENTER_PACKAGE - HDassert(f); - HDassert(p); + assert(f); + assert(p); if (NULL == (fill = H5FL_CALLOC(H5O_fill_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") @@ -335,8 +335,8 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag FUNC_ENTER_PACKAGE - HDassert(f); - HDassert(p); + assert(f); + assert(p); if (NULL == (fill = H5FL_CALLOC(H5O_fill_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") @@ -414,9 +414,9 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) FUNC_ENTER_PACKAGE_NOERR - HDassert(f); - HDassert(p); - HDassert(fill && NULL == fill->type); + assert(f); + assert(p); + assert(fill && NULL == fill->type); /* Version */ *p++ = (uint8_t)fill->version; @@ -445,12 +445,12 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) uint8_t flags = 0; /* Fill value setting flags */ /* Encode space allocation time */ - HDassert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time)); + assert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time)); flags = (uint8_t)(flags | ((H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time) << H5O_FILL_SHIFT_ALLOC_TIME)); /* Encode fill value writing time */ - HDassert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time)); + assert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time)); flags = (uint8_t)(flags | ((H5O_FILL_MASK_FILL_TIME & fill->fill_time) << H5O_FILL_SHIFT_FILL_TIME)); /* Check if we need to encode a fill value size */ @@ -462,7 +462,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) *p++ = (uint8_t)flags; /* Sanity check */ - HDassert(!fill->buf); + assert(!fill->buf); } /* end if */ else if (fill->size > 0) { /* Indicate that a fill value size is present */ @@ -475,7 +475,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) INT32ENCODE(p, fill->size); /* Encode the fill value */ - HDassert(fill->buf); + assert(fill->buf); H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t); H5MM_memcpy(p, fill->buf, (size_t)fill->size); } /* end if */ @@ -484,7 +484,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) *p++ = (uint8_t)flags; /* Sanity check */ - HDassert(!fill->buf); + assert(!fill->buf); } /* end else */ } /* end else */ @@ -510,9 +510,9 @@ H5O__fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) FUNC_ENTER_PACKAGE_NOERR - HDassert(f); - HDassert(p); - HDassert(fill && NULL == fill->type); + assert(f); + assert(p); + assert(fill && NULL == fill->type); UINT32ENCODE(p, fill->size); if (fill->buf) @@ -546,7 +546,7 @@ H5O__fill_copy(const void *_src, void *_dst) FUNC_ENTER_PACKAGE - HDassert(src); + assert(src); if (!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message") @@ -664,8 +664,8 @@ H5O__fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill) FUNC_ENTER_PACKAGE_NOERR - HDassert(f); - HDassert(fill); + assert(f); + assert(fill); /* Determine size for different versions */ if (fill->version < H5O_FILL_VERSION_3) { @@ -710,7 +710,7 @@ H5O__fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill) FUNC_ENTER_PACKAGE_NOERR - HDassert(fill); + assert(fill); FUNC_LEAVE_NOAPI(4 + (size_t)fill->size) } /* end H5O__fill_old_size() */ @@ -735,7 +735,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill) FUNC_ENTER_NOAPI(FAIL) - HDassert(fill); + assert(fill); if (fill->buf) { if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) { @@ -799,7 +799,7 @@ H5O__fill_reset(void *_fill) FUNC_ENTER_PACKAGE_NOERR - HDassert(fill); + assert(fill); /* Reset dynamic fields */ H5O_fill_reset_dyn(fill); @@ -829,7 +829,7 @@ H5O__fill_free(void *fill) { FUNC_ENTER_PACKAGE_NOERR - HDassert(fill); + assert(fill); fill = H5FL_FREE(H5O_fill_t, fill); @@ -859,8 +859,8 @@ H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hb FUNC_ENTER_PACKAGE /* check args */ - HDassert(cpy_info); - HDassert(cpy_info->file_dst); + assert(cpy_info); + assert(cpy_info->file_dst); /* Check to ensure that the version of the message to be copied does not exceed the message version allowed by the destination file's high bound */ @@ -891,81 +891,81 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in FUNC_ENTER_PACKAGE_NOERR - HDassert(f); - HDassert(fill); - HDassert(stream); - HDassert(indent >= 0); - HDassert(fwidth >= 0); + assert(f); + assert(fill); + assert(stream); + assert(indent >= 0); + assert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:"); switch (fill->alloc_time) { case H5D_ALLOC_TIME_EARLY: - HDfprintf(stream, "Early\n"); + fprintf(stream, "Early\n"); break; case H5D_ALLOC_TIME_LATE: - HDfprintf(stream, "Late\n"); + fprintf(stream, "Late\n"); break; case H5D_ALLOC_TIME_INCR: - HDfprintf(stream, "Incremental\n"); + fprintf(stream, "Incremental\n"); break; case H5D_ALLOC_TIME_DEFAULT: case H5D_ALLOC_TIME_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:"); switch (fill->fill_time) { case H5D_FILL_TIME_ALLOC: - HDfprintf(stream, "On Allocation\n"); + fprintf(stream, "On Allocation\n"); break; case H5D_FILL_TIME_NEVER: - HDfprintf(stream, "Never\n"); + fprintf(stream, "Never\n"); break; case H5D_FILL_TIME_IFSET: - HDfprintf(stream, "If Set\n"); + fprintf(stream, "If Set\n"); break; case H5D_FILL_TIME_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:"); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:"); H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status); switch (fill_status) { case H5D_FILL_VALUE_UNDEFINED: - HDfprintf(stream, "Undefined\n"); + fprintf(stream, "Undefined\n"); break; case H5D_FILL_VALUE_DEFAULT: - HDfprintf(stream, "Default\n"); + fprintf(stream, "Default\n"); break; case H5D_FILL_VALUE_USER_DEFINED: - HDfprintf(stream, "User Defined\n"); + fprintf(stream, "User Defined\n"); break; case H5D_FILL_VALUE_ERROR: default: - HDfprintf(stream, "Unknown!\n"); + fprintf(stream, "Unknown!\n"); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size); - HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); + fprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size); + fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); if (fill->type) { H5T_debug(fill->type, stream); - HDfprintf(stream, "\n"); + fprintf(stream, "\n"); } /* end if */ else - HDfprintf(stream, "<dataset type>\n"); + fprintf(stream, "<dataset type>\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fill_debug() */ @@ -995,9 +995,9 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed) FUNC_ENTER_NOAPI(FAIL) - HDassert(fill); - HDassert(dset_type); - HDassert(fill_changed); + assert(fill); + assert(dset_type); + assert(fill_changed); /* No-op cases */ if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) { @@ -1089,8 +1089,8 @@ H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill) FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ - HDassert(f); - HDassert(fill); + assert(f); + assert(fill); /* Upgrade to the version indicated by the file's low bound if higher */ version = MAX(fill->version, H5O_fill_ver_bounds[H5F_LOW_BOUND(f)]); |