isl_hash_table_remove: update number of entries
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 22 Jan 2009 20:46:36 +0000 (21:46 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 3 Feb 2009 20:47:07 +0000 (21:47 +0100)
Otherwise, removing an element and later adding it back again
would increase the number of elements in the table, quickly
leading to overflows.

isl_hash.c

index 41076b8..3a39bbc 100644 (file)
@@ -91,4 +91,5 @@ void isl_hash_table_remove(struct isl_ctx *ctx,
 
        entry->hash = 0;
        entry->data = NULL;
+       table->n--;
 }