fixed hashtable->get_count() after doubling table size
authorMartin Willi <martin@strongswan.org>
Tue, 9 Dec 2008 11:13:52 +0000 (11:13 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 9 Dec 2008 11:13:52 +0000 (11:13 -0000)
src/libstrongswan/utils/hashtable.c

index 6b53ec2..7428fd3 100644 (file)
@@ -165,7 +165,6 @@ static u_int get_nearest_powerof2(u_int n)
 static void init_hashtable(private_hashtable_t *this, u_int capacity)
 {
        capacity = max(1, min(capacity, MAX_CAPACITY));
-       this->count = 0;
        this->capacity = get_nearest_powerof2(capacity);
        this->mask = this->capacity - 1;
        this->load_factor = 0.75;