diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-23 20:30:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-23 20:30:07 (GMT) |
commit | a4d6a270783d69c663357c31fcd6196b98706dfb (patch) | |
tree | ce4cd3ff16aa0a3918c4e999d3b6ba63a35a41fe /tools/h5jam/h5unjam.c | |
parent | a0947d808fb3b0af98032beb1a4f5353443c8aa3 (diff) | |
download | hdf5-a4d6a270783d69c663357c31fcd6196b98706dfb.zip hdf5-a4d6a270783d69c663357c31fcd6196b98706dfb.tar.gz hdf5-a4d6a270783d69c663357c31fcd6196b98706dfb.tar.bz2 |
HDFFV-10903 merge S3 from dev
Diffstat (limited to 'tools/h5jam/h5unjam.c')
-rw-r--r-- | tools/h5jam/h5unjam.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 59e5dae..ffe2aca 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -19,8 +19,6 @@ /* Name of tool */ #define PROGRAMNAME "h5unjam" -#define TRUE 1 -#define FALSE 0 #define COPY_BUF_SIZE 1024 hsize_t write_pad( int , hsize_t ); @@ -334,17 +332,19 @@ done: *------------------------------------------------------------------------- */ herr_t -copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t how_much ) +copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much ) { static char buf[COPY_BUF_SIZE]; + size_t how_much; off_t where = (off_t)_where; off_t to; off_t from; herr_t ret_value = 0; /* nothing to copy */ - if(how_much <= 0) + if(show_much <= 0) goto done; + how_much = (size_t)show_much; /* rewind */ HDfseek(infid, 0L, 0); @@ -379,8 +379,8 @@ copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t how_much ) /* Update positions/size */ how_much -= bytes_read; - from += bytes_read; - to += bytes_read; + from += (off_t)bytes_read; + to += (off_t)bytes_read; /* Write nchars bytes to output file */ bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid); |