diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /src/H5Faccum.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src/H5Faccum.c')
-rw-r--r-- | src/H5Faccum.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/H5Faccum.c b/src/H5Faccum.c index 5e39215..ceb019c 100644 --- a/src/H5Faccum.c +++ b/src/H5Faccum.c @@ -107,8 +107,8 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(f_sh); - HDassert(buf); + assert(f_sh); + assert(buf); /* Translate to file driver I/O info object */ file = f_sh->lf; @@ -122,7 +122,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si if (size < H5F_ACCUM_MAX_SIZE) { /* Sanity check */ - HDassert(!accum->buf || (accum->alloc_size >= accum->size)); + assert(!accum->buf || (accum->alloc_size >= accum->size)); /* Current read adjoins or overlaps with metadata accumulator */ if (H5F_addr_defined(accum->loc) && @@ -152,7 +152,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si accum->alloc_size = new_alloc_size; /* Clear the memory */ - HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size)); + memset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size)); } /* end if */ /* Read the part before the metadata accumulator */ @@ -275,11 +275,11 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju FUNC_ENTER_PACKAGE - HDassert(accum); - HDassert(file); - HDassert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust); - HDassert(size > 0); - HDassert(size <= H5F_ACCUM_MAX_SIZE); + assert(accum); + assert(file); + assert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust); + assert(size > 0); + assert(size <= H5F_ACCUM_MAX_SIZE); /* Check if we need more buffer space */ if ((size + accum->size) > accum->alloc_size) { @@ -388,7 +388,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju accum->alloc_size = new_size; /* Clear the memory */ - HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size))); + memset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size))); } /* end if */ } /* end if */ @@ -418,9 +418,9 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(f_sh); - HDassert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR); - HDassert(buf); + assert(f_sh); + assert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR); + assert(buf); /* Translate to file driver pointer */ file = f_sh->lf; @@ -434,7 +434,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s if (size < H5F_ACCUM_MAX_SIZE) { /* Sanity check */ - HDassert(!accum->buf || (accum->alloc_size >= accum->size)); + assert(!accum->buf || (accum->alloc_size >= accum->size)); /* Check if there is already metadata in the accumulator */ if (accum->size > 0) { @@ -618,7 +618,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s accum->alloc_size = new_alloc_size; /* Clear the memory */ - HDmemset(accum->buf + size, 0, (accum->alloc_size - size)); + memset(accum->buf + size, 0, (accum->alloc_size - size)); } /* end if */ /* Copy the new metadata to the buffer */ @@ -665,7 +665,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Clear the memory */ clear_size = MAX(accum->size, size); - HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size)); + memset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size)); } /* end if */ else { /* Check if we should shrink the accumulator buffer */ @@ -715,7 +715,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s accum->alloc_size = new_size; /* Clear the memory */ - HDmemset(accum->buf + size, 0, (accum->alloc_size - size)); + memset(accum->buf + size, 0, (accum->alloc_size - size)); } /* end if */ /* Update the metadata accumulator information */ @@ -794,7 +794,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s size_t overlap_size; /* Size of overlapping region */ /* Sanity check */ - HDassert(H5F_addr_gt(addr + size, accum->loc + accum->size)); + assert(H5F_addr_gt(addr + size, accum->loc + accum->size)); /* Compute overlap size */ overlap_size = (size_t)((accum->loc + accum->size) - addr); @@ -859,7 +859,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr FUNC_ENTER_PACKAGE /* check arguments */ - HDassert(f_sh); + assert(f_sh); /* Set up alias for file's metadata accumulator info */ accum = &f_sh->accum; @@ -874,8 +874,8 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr /* Sanity check */ /* (The metadata accumulator should not intersect w/raw data */ - HDassert(H5FD_MEM_DRAW != type); - HDassert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */ + assert(H5FD_MEM_DRAW != type); + assert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */ /* Check for overlapping the beginning of the accumulator */ if (H5F_addr_le(addr, accum->loc)) { @@ -952,7 +952,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr write_size = (size_t)(dirty_end - tail_addr); dirty_delta = accum->dirty_len - write_size; - HDassert(write_size > 0); + assert(write_size > 0); /* Write out the unfreed dirty region of the accumulator */ if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, @@ -973,7 +973,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr write_size = (size_t)(dirty_end - tail_addr); dirty_delta = accum->dirty_len - write_size; - HDassert(write_size > 0); + assert(write_size > 0); /* Write out the unfreed end of the dirty region of the accumulator */ if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, @@ -1023,7 +1023,7 @@ H5F__accum_flush(H5F_shared_t *f_sh) FUNC_ENTER_NOAPI(FAIL) /* Sanity checks */ - HDassert(f_sh); + assert(f_sh); /* Check if we need to flush out the metadata accumulator */ if ((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && f_sh->accum.dirty) { @@ -1065,7 +1065,7 @@ H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush) FUNC_ENTER_PACKAGE /* Sanity checks */ - HDassert(f_sh); + assert(f_sh); /* Flush any dirty data in accumulator, if requested */ if (flush) |