소스 검색

add num_entries assertion

Thomas Waldmann 2 년 전
부모
커밋
316bb7c937
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/borg/_hashindex.c

+ 2 - 0
src/borg/_hashindex.c

@@ -225,6 +225,8 @@ hashindex_resize(HashIndex *index, int capacity)
             return 0;
         }
     }
+    assert(index->num_entries == new->num_entries);
+
     hashindex_free_buckets(index);
     index->buckets = new->buckets;
     index->num_buckets = new->num_buckets;