diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-10-09 14:23:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-10-17 15:57:56 (GMT) |
commit | 633b7f93ce6f2cca85c9930010fded235ff8eaa6 (patch) | |
tree | d97582532c8e190c8936ee83cd3d1bb8a2a53d07 /tools/src/h5repack | |
parent | a82aee9a5fb4b10951d95a0422a4125b18fe9a52 (diff) | |
download | hdf5-633b7f93ce6f2cca85c9930010fded235ff8eaa6.zip hdf5-633b7f93ce6f2cca85c9930010fded235ff8eaa6.tar.gz hdf5-633b7f93ce6f2cca85c9930010fded235ff8eaa6.tar.bz2 |
TRILAB-81 coverity fixes
Diffstat (limited to 'tools/src/h5repack')
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 6 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_main.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index b279cf9..0567269 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1422,9 +1422,9 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size) } /* end while */ done: - if (infid > 0) + if (infid >= 0) HDclose(infid); - if (outfid > 0) + if (outfid >= 0) HDclose(outfid); return ret_value; @@ -1497,7 +1497,7 @@ print_user_block(const char *filename, hid_t fid) } done: - if (fh > 0) + if (fh >= 0) HDclose(fh); return; diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 8f0178f..dec25f9 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -707,6 +707,8 @@ int main(int argc, const char **argv) void *edata; void *tools_edata; + HDmemset(&options, 0, sizeof(pack_opt_t)); + h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); |