summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-01-20 21:03:22 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-01-20 21:03:22 (GMT)
commita988519ad03544cdb0c0f3984fb7c911ce49ad56 (patch)
tree446850a0e5cf59ce3b68227f5d074086458ce832 /tools/lib
parent75f65c15836248688110342528629039e40c1cd0 (diff)
downloadhdf5-a988519ad03544cdb0c0f3984fb7c911ce49ad56.zip
hdf5-a988519ad03544cdb0c0f3984fb7c911ce49ad56.tar.gz
hdf5-a988519ad03544cdb0c0f3984fb7c911ce49ad56.tar.bz2
[svn-r18126] Fix for bug1749: Incorrect code in diff() function for links compare
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 7d11f2f..18dd1ed 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -1024,7 +1024,7 @@ hsize_t diff(hid_t file1_id,
if(H5Lget_info(file1_id, path1, &li1, H5P_DEFAULT) < 0)
goto out;
- if(H5Lget_info(file1_id, path1, &li2, H5P_DEFAULT) < 0)
+ if(H5Lget_info(file2_id, path2, &li2, H5P_DEFAULT) < 0)
goto out;
buf1 = HDmalloc(li1.u.val_size);
@@ -1062,7 +1062,7 @@ hsize_t diff(hid_t file1_id,
if(H5Lget_info(file1_id, path1, &li1, H5P_DEFAULT) < 0)
goto out;
- if(H5Lget_info(file1_id, path1, &li2, H5P_DEFAULT) < 0)
+ if(H5Lget_info(file2_id, path2, &li2, H5P_DEFAULT) < 0)
goto out;
/* Only external links will have a query function registered */
@@ -1085,16 +1085,6 @@ hsize_t diff(hid_t file1_id,
/* If the buffers are the same size, compare them */
if(li1.u.val_size == li2.u.val_size) {
- if(H5Lget_val(file1_id, path1, buf1, li1.u.val_size, H5P_DEFAULT) < 0) {
- HDfree(buf1);
- HDfree(buf2);
- goto out;
- } /* end if */
- if(H5Lget_val(file2_id, path2, buf2, li2.u.val_size, H5P_DEFAULT) < 0) {
- HDfree(buf1);
- HDfree(buf2);
- goto out;
- } /* end if */
ret = HDmemcmp(buf1, buf2, li1.u.val_size);
}
else