diff options
-rw-r--r-- | src/H5AC.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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) { |