diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-07-11 22:48:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 22:48:51 (GMT) |
commit | af014fa61c1ffcf5a09d68e357b0190fe8ee0efa (patch) | |
tree | 2eaa1714a38e3450c2c82127b94c4a513449f548 /src/H5FDfamily.c | |
parent | dae60641036f73c64f3592317405550246464be5 (diff) | |
download | hdf5-af014fa61c1ffcf5a09d68e357b0190fe8ee0efa.zip hdf5-af014fa61c1ffcf5a09d68e357b0190fe8ee0efa.tar.gz hdf5-af014fa61c1ffcf5a09d68e357b0190fe8ee0efa.tar.bz2 |
Removes definitions for (U)LLONG_MAX and (S)SIZET_MAX (#1877)
LLONG_MAX and ULLONG_MAX are defined in limits.h in C99. SIZET_MAX
should be SIZE_MAX, which has been around forever. SSIZET_MAX should
be SSIZE_MAX, which is defined whereever ssize_t is found. I've kept
the definition for SSIZE_MAX (renamed from SSIZET_MAX) for platforms
where ssize_T is not present (e.g., Windows).
Diffstat (limited to 'src/H5FDfamily.c')
-rw-r--r-- | src/H5FDfamily.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index e6ba5a7..3107c8f 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -1249,8 +1249,8 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s * is 4 bytes, to prevent overflow when user application is trying to * write files bigger than 4GB. */ tempreq = file->memb_size - sub; - if (tempreq > SIZET_MAX) - tempreq = SIZET_MAX; + if (tempreq > SIZE_MAX) + tempreq = SIZE_MAX; req = MIN(size, (size_t)tempreq); HDassert(u < file->nmembs); @@ -1314,8 +1314,8 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, * is 4 bytes, to prevent overflow when user application is trying to * write files bigger than 4GB. */ tempreq = file->memb_size - sub; - if (tempreq > SIZET_MAX) - tempreq = SIZET_MAX; + if (tempreq > SIZE_MAX) + tempreq = SIZE_MAX; req = MIN(size, (size_t)tempreq); HDassert(u < file->nmembs); |