[hipl-commit] [trunk] Rev 3904: fixed compiler warning for maemo

  • From: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 10 Mar 2010 13:26:38 +0200

Committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
Date: Wed Mar 10 12:25:48 2010 +0100
Revision: 3904
Revision-id: rene.hummen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  fixed compiler warning for maemo

Modified:
  M  firewall/proxy.c

=== modified file 'firewall/proxy.c'
--- firewall/proxy.c    2010-03-09 21:23:38 +0000
+++ firewall/proxy.c    2010-03-10 11:25:48 +0000
@@ -976,15 +976,15 @@
     return err;
 }
 
-static int hip_proxy_send_inbound_icmp_pkt(struct in6_addr *src_addr, struct 
in6_addr *dst_addr, uint8_t *buff, uint16_t len)
+static int hip_proxy_send_inbound_icmp_pkt(struct in6_addr *src_addr, struct 
in6_addr *dst_addr, const unsigned char *buff, uint16_t len)
 {
     struct sockaddr_in6 src6, dst6;
-    struct ip *ip;
-    struct ip6_hdr *ip6;
-    struct icmphdr *icmp;
+    struct ip *ip = NULL;
+    struct ip6_hdr *ip6 = NULL;
+    struct icmphdr *icmp = NULL;
     int sa_size, sent;
     int on = 1;
-    uint8_t *msg;
+    unsigned char *msg = NULL;
 
     ip = (struct ip *) buff;
 
@@ -1001,7 +1001,7 @@
     HIP_DEBUG_IN6ADDR("dst6", &dst6.sin6_addr);
 
     sa_size = sizeof(struct sockaddr_in6);
-    msg = (uint8_t *) HIP_MALLOC((len + sizeof(struct ip6_hdr) - ip->ip_hl), 
0);
+    msg = HIP_MALLOC((len + sizeof(struct ip6_hdr) - ip->ip_hl), 0);
     memset(msg, 0, (len + sizeof(struct ip6_hdr) - ip->ip_hl));
 
     ip6 = (struct ip6_hdr *) msg;
@@ -1142,7 +1142,7 @@
             }
 
             if ((protocol == IPPROTO_ICMP) || (protocol == IPPROTO_ICMPV6)) {
-                hip_proxy_send_inbound_icmp_pkt(proxy_hit, &entry->hit_peer, 
(uint8_t *) m->payload, m->data_len);
+                hip_proxy_send_inbound_icmp_pkt(proxy_hit, &entry->hit_peer, 
m->payload, m->data_len);
                 /* drop packet */
                 err = 0;
             } else {

Other related posts:

  • » [hipl-commit] [trunk] Rev 3904: fixed compiler warning for maemo - Rene Hummen