X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fstaging%2Fbatman-adv%2Fhash.c;h=8ef26eb4949df97054ecf37c4fbbcb4382761b4d;hb=a0e3390787ef523699ae1f3f3ea0ca953e630be2;hp=1286f8ff44f40e46a94b8db98c22c4ac23b1c9ff;hpb=e9a68707d736f4f73d7e209885d7b4c5c452b1dc;p=pandora-kernel.git diff --git a/drivers/staging/batman-adv/hash.c b/drivers/staging/batman-adv/hash.c index 1286f8ff44f4..8ef26eb4949d 100644 --- a/drivers/staging/batman-adv/hash.c +++ b/drivers/staging/batman-adv/hash.c @@ -36,7 +36,7 @@ static void hash_init(struct hashtable_t *hash) /* remove the hash structure. if hashdata_free_cb != NULL, this function will be * called to remove the elements inside of the hash. if you don't remove the * elements, memory might be leaked. */ -void hash_delete(struct hashtable_t *hash, hashdata_free_cb free_cb) +void hash_delete(struct hashtable_t *hash, hashdata_free_cb free_cb, void *arg) { struct element_t *bucket, *last_bucket; int i; @@ -46,7 +46,7 @@ void hash_delete(struct hashtable_t *hash, hashdata_free_cb free_cb) while (bucket != NULL) { if (free_cb != NULL) - free_cb(bucket->data); + free_cb(bucket->data, arg); last_bucket = bucket; bucket = bucket->next; @@ -300,7 +300,7 @@ struct hashtable_t *hash_resize(struct hashtable_t *hash, int size) /* remove hash and eventual overflow buckets but not the content * itself. */ - hash_delete(hash, NULL); + hash_delete(hash, NULL, NULL); return new_hash; }