소스 검색

hashindex: fix upper limit

use num_buckets (== fully use what we currently have allocated)
Thomas Waldmann 9 년 전
부모
커밋
083f5e31ef
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      borg/_hashindex.c

+ 1 - 1
borg/_hashindex.c

@@ -155,7 +155,7 @@ int get_lower_limit(int num_buckets){
 int get_upper_limit(int num_buckets){
     int max_buckets = hash_sizes[NELEMS(hash_sizes) - 1];
     if (num_buckets >= max_buckets)
-        return max_buckets;
+        return num_buckets;
     return (int)(num_buckets * HASH_MAX_LOAD);
 }