diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-28 19:33:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 19:33:16 (GMT) |
commit | 8ddf2706f7e0cde59fad6624e2863960e62f6544 (patch) | |
tree | f090bb9fa368c90f67029f5d860ef39df3e8b038 /src/H5FDdirect.c | |
parent | b1ab59d239c74cdbea7d518b1398458c4150655f (diff) | |
download | hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.zip hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.gz hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.bz2 |
Sync of src w/ develop (#3307)
Diffstat (limited to 'src/H5FDdirect.c')
-rw-r--r-- | src/H5FDdirect.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 3e58162..d3332c8 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -526,11 +526,11 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad * than the one where the program is running. */ /* NOTE: Use malloc and free here to ensure compatibility with - * HDposix_memalign. + * posix_memalign(). */ buf1 = malloc(sizeof(int)); - if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed") + if (posix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "posix_memalign failed") if (o_flags & O_CREAT) { if (HDwrite(file->fd, buf1, sizeof(int)) < 0) { @@ -635,36 +635,36 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) #ifdef H5_HAVE_WIN32_API if (f1->fileindexhi < f2->fileindexhi) - HGOTO_DONE(-1) + HGOTO_DONE(-1); if (f1->fileindexhi > f2->fileindexhi) - HGOTO_DONE(1) + HGOTO_DONE(1); if (f1->fileindexlo < f2->fileindexlo) - HGOTO_DONE(-1) + HGOTO_DONE(-1); if (f1->fileindexlo > f2->fileindexlo) - HGOTO_DONE(1) + HGOTO_DONE(1); #else #ifdef H5_DEV_T_IS_SCALAR if (f1->device < f2->device) - HGOTO_DONE(-1) + HGOTO_DONE(-1); if (f1->device > f2->device) - HGOTO_DONE(1) + HGOTO_DONE(1); #else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... */ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0) - HGOTO_DONE(-1) + HGOTO_DONE(-1); if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0) - HGOTO_DONE(1) + HGOTO_DONE(1); #endif /* H5_DEV_T_IS_SCALAR */ if (f1->inode < f2->inode) - HGOTO_DONE(-1) + HGOTO_DONE(-1); if (f1->inode > f2->inode) - HGOTO_DONE(1) + HGOTO_DONE(1); #endif @@ -896,8 +896,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U if (alloc_size > _cbsize) alloc_size = _cbsize; assert(!(alloc_size % _fbsize)); - if (HDposix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed") + if (posix_memalign(©_buf, _boundary, alloc_size) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") /* look for the aligned position for reading the data */ assert(!(((addr / _fbsize) * _fbsize) % _fbsize)); @@ -1074,8 +1074,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_ alloc_size = _cbsize; assert(!(alloc_size % _fbsize)); - if (HDposix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed") + if (posix_memalign(©_buf, _boundary, alloc_size) != 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") /* look for the right position for reading or writing the data */ if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0) |