summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5AC.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 5f22c7b..00ecf0e 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -311,11 +311,16 @@ H5AC_compare(const void *_a, const void *_b)
assert(current_cache_g);
- if(NULL==current_cache_g->slot[a]) {
- if (NULL == current_cache_g->slot[b]) {
- return 0;
- } else {
- return -1;
+ if(NULL==current_cache_g->slot[a] || NULL == current_cache_g->slot[b]) {
+ if(NULL==current_cache_g->slot[a]) {
+ if (NULL == current_cache_g->slot[b]) {
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ else {
+ return 1;
}
}
else if (NULL == current_cache_g->slot[a]->type) {