From a988519ad03544cdb0c0f3984fb7c911ce49ad56 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 20 Jan 2010 16:03:22 -0500 Subject: [svn-r18126] Fix for bug1749: Incorrect code in diff() function for links compare --- tools/lib/h5diff.c | 14 ++------------ 1 file 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 -- cgit v0.12