summaryrefslogtreecommitdiffstats
path: root/src/H5VLint.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2019-11-28 04:48:01 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2019-11-28 04:48:01 (GMT)
commitece625e3b680aafb33b0ef4ec101792e20be4aac (patch)
treef3d6a34b9ad7e6cfd9e8f5e4f19ba603f927e3ad /src/H5VLint.c
parente23e67798ace036628f291c4f77831a895b67286 (diff)
downloadhdf5-ece625e3b680aafb33b0ef4ec101792e20be4aac.zip
hdf5-ece625e3b680aafb33b0ef4ec101792e20be4aac.tar.gz
hdf5-ece625e3b680aafb33b0ef4ec101792e20be4aac.tar.bz2
Fix bugs in H5VL file comparison code. Add short circuit success to
H5VL_cmp_connector_cls().
Diffstat (limited to 'src/H5VLint.c')
-rw-r--r--src/H5VLint.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 733a2b5..284b266 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -1639,6 +1639,12 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
HDassert(cls1);
HDassert(cls2);
+ /* If the pointers are the same the classes are the same */
+ if(cls1 == cls2) {
+ *cmp_value = 0;
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+
/* Compare connector "values" */
if(cls1->value < cls2->value) {
*cmp_value = -1;