Browse Source

add num_entries assertion

Thomas Waldmann 2 năm trước cách đây
mục cha
commit
a7ce1db529
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/borg/_hashindex.c

+ 2 - 0
src/borg/_hashindex.c

@@ -213,6 +213,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;