------------------------------------------------------------ revno: 5154 committer: Diego Biurrun <diego@xxxxxxxxxx> branch nick: trunk timestamp: Mon 2010-11-15 14:38:47 +0100 message: Remove some pointless void* casts. void* is compatible with any pointer type. modified: firewall/esp_prot_conntrack.c lib/core/hashchain_store.c lib/tool/pk.c -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/esp_prot_conntrack.c' --- firewall/esp_prot_conntrack.c 2010-10-15 15:29:14 +0000 +++ firewall/esp_prot_conntrack.c 2010-11-15 13:38:47 +0000 @@ -111,7 +111,7 @@ long i; if (cache_item) { - anchor_item = (struct esp_anchor_item *) cache_item; + anchor_item = cache_item; for (i = 0; i < num_parallel_hchains; i++) { if (anchor_item->active_anchors[i]) { @@ -399,8 +399,7 @@ } // delete cached item from the list - HIP_IFEL(!(anchor_item = (struct esp_anchor_item *) - hip_ll_del(&esp_tuple->anchor_cache, + HIP_IFEL(!(anchor_item = hip_ll_del(&esp_tuple->anchor_cache, element_index, NULL)), -1, "failed to remove anchor_item from list\n"); free(anchor_item); === modified file 'lib/core/hashchain_store.c' --- lib/core/hashchain_store.c 2010-10-18 17:44:31 +0000 +++ lib/core/hashchain_store.c 2010-11-15 13:38:47 +0000 @@ -48,7 +48,7 @@ */ static void hcstore_free_hchain(void *hchain) { - hchain_free((hash_chain_t *) hchain); + hchain_free(hchain); } /** helper function to free a hash tree @@ -57,7 +57,7 @@ */ static void hcstore_free_htree(void *htree) { - htree_free((hash_tree_t *) htree); + htree_free(htree); } /** initializes a new hash item store === modified file 'lib/tool/pk.c' --- lib/tool/pk.c 2010-08-19 09:32:20 +0000 +++ lib/tool/pk.c 2010-11-15 13:38:47 +0000 @@ -41,7 +41,7 @@ */ int hip_rsa_sign(void *priv_key, struct hip_common *msg) { - RSA *rsa = (RSA *) priv_key; + RSA *rsa = priv_key; uint8_t sha1_digest[HIP_AH_SHA_LEN]; uint8_t *signature = NULL; int err = 0, len;