diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-26 15:03:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-26 15:03:03 (GMT) |
commit | 7e9c4449d4a78e756f6935ef828bc440224a86ab (patch) | |
tree | ef5c939922e2c1e227b32498d92f0eb3ff962ac5 /src/H5FDsec2.c | |
parent | c1b11ba3c438403b996998671bc1119a62be6995 (diff) | |
download | hdf5-7e9c4449d4a78e756f6935ef828bc440224a86ab.zip hdf5-7e9c4449d4a78e756f6935ef828bc440224a86ab.tar.gz hdf5-7e9c4449d4a78e756f6935ef828bc440224a86ab.tar.bz2 |
[svn-r7411] Purpose:
Code cleanup
Description:
De-linted more modules
Platforms tested:
FreeBSD 4.8 (sleipnir) w/ & w/o stream enabled
too minor to require h5committest
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r-- | src/H5FDsec2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index ceacaab..5b73475 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -114,7 +114,7 @@ typedef struct H5FD_sec2_t { # /*MSVC*/ # define file_offset_t __int64 # define file_seek _lseeki64 -# define file_truncate _ftruncatei64 +# define file_truncate _chsize #else # define file_offset_t off_t # define file_seek lseek @@ -141,7 +141,6 @@ typedef struct H5FD_sec2_t { ((A) & ~(haddr_t)MAXADDR)) #define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR) #define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \ - sizeof(file_offset_t)<sizeof(size_t) || \ HADDR_UNDEF==(A)+(Z) || \ (file_offset_t)((A)+(Z))<(file_offset_t)(A)) @@ -306,6 +305,9 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id, FUNC_ENTER_NOAPI(H5FD_sec2_open, NULL) + /* Sanity check on file offsets */ + assert(sizeof(file_offset_t)>=sizeof(size_t)); + /* Check arguments */ if (!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") |