From: Sven Verdoolaege Date: Thu, 22 Jan 2009 20:46:36 +0000 (+0100) Subject: isl_hash_table_remove: update number of entries X-Git-Tag: isl-0.01~308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db05fd0568ec9d1e0444f3064df52f6048cc1121;hp=350d59fe656293a3437d40a50a2c56c0c3dfb49a;p=platform%2Fupstream%2Fisl.git isl_hash_table_remove: update number of entries Otherwise, removing an element and later adding it back again would increase the number of elements in the table, quickly leading to overflows. --- diff --git a/isl_hash.c b/isl_hash.c index 41076b8..3a39bbc 100644 --- a/isl_hash.c +++ b/isl_hash.c @@ -91,4 +91,5 @@ void isl_hash_table_remove(struct isl_ctx *ctx, entry->hash = 0; entry->data = NULL; + table->n--; }