[hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 5154: Remove some pointless void* casts.

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Mon, 15 Nov 2010 12:44:38 -0000

------------------------------------------------------------
revno: 5154
committer: Diego Biurrun <diego@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-11-15 13:42:35 +0100
message:
  Remove some pointless void* casts.
  
  void* is compatible with any pointer type.
modified:
  firewall/esp_prot_conntrack.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 12:42:35 +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/tool/pk.c'
--- lib/tool/pk.c       2010-08-19 09:32:20 +0000
+++ lib/tool/pk.c       2010-11-15 12:42:35 +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;

Other related posts: