summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-03-09 19:02:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-03-09 19:02:24 (GMT)
commit2e3313e3d82cb965842e1c65c594c9f446100b7d (patch)
treea412dffe721db3a74e5399cf81fa134bf2b2235f /tools/h5repack
parentb765eca684dcc60600d0e72572cb58872acc2aec (diff)
downloadhdf5-2e3313e3d82cb965842e1c65c594c9f446100b7d.zip
hdf5-2e3313e3d82cb965842e1c65c594c9f446100b7d.tar.gz
hdf5-2e3313e3d82cb965842e1c65c594c9f446100b7d.tar.bz2
Check sizeof type to use correct ref_type
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/h5repack_refs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index e4e9010..c40716a 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -171,9 +171,10 @@ int do_copy_refobjs(hid_t fidin,
} /* end if */
for(u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY {
- if((refobj_id = H5Rdereference(dset_in, H5R_OBJECT, &buf[u])) < 0)
- continue;
+ refobj_id = H5Rdereference(dset_in, H5R_OBJECT, &buf[u]);
} H5E_END_TRY;
+ if(refobj_id < 0)
+ continue;
/* get the name. a valid name could only occur
* in the second traversal of the file
@@ -252,9 +253,10 @@ int do_copy_refobjs(hid_t fidin,
for(u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY {
- if((refobj_id = H5Rdereference(dset_in, H5R_DATASET_REGION, &buf[u])) < 0)
- continue;
+ refobj_id = H5Rdereference(dset_in, H5R_DATASET_REGION, &buf[u]);
} H5E_END_TRY;
+ if(refobj_id < 0)
+ continue;
/* get the name. a valid name could only occur
* in the second traversal of the file