Patch ALIGN_NOWARN_ARM macro for better priority handling.
[olsrd.git] / lib / mdns / src / Packet.c
index dfa0ab8..f035e35 100644 (file)
@@ -66,7 +66,7 @@ IsIpFragment(unsigned char *ipPacket)
 
   assert(ipPacket != NULL);
 
-  iph = (struct ip *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct ip *)ARM_NOWARN_ALIGN(ipPacket);
   if ((ntohs(iph->ip_off) & IP_OFFMASK) != 0) {
     return 1;
   }
@@ -89,7 +89,7 @@ GetIpTotalLength(unsigned char *ipPacket)
 
   assert(ipPacket != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
   return ntohs(iph->tot_len);
 }                               /* GetIpTotalLength */
 
@@ -108,7 +108,7 @@ GetIpHeaderLength(unsigned char *ipPacket)
 
   assert(ipPacket != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
   return iph->ihl << 2;
 }                               /* GetIpHeaderLength */
 
@@ -128,7 +128,7 @@ GetTtl(unsigned char *ipPacket)
 
   assert(ipPacket != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
   return iph->ttl;
 }                               /* GetTtl */
 
@@ -148,7 +148,7 @@ SaveTtlAndChecksum(unsigned char *ipPacket, struct TSaveTtl *sttl)
 
   assert(ipPacket != NULL && sttl != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
   sttl->ttl = iph->ttl;
   sttl->check = ntohs(iph->check);
 }                               /* SaveTtlAndChecksum */
@@ -170,7 +170,7 @@ RestoreTtlAndChecksum(unsigned char *ipPacket, struct TSaveTtl *sttl)
 
   assert(ipPacket != NULL && sttl != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
   iph->ttl = sttl->ttl;
   iph->check = htons(sttl->check);
 }                               /* RestoreTtlAndChecksum */
@@ -193,7 +193,7 @@ DecreaseTtlAndUpdateHeaderChecksum(unsigned char *ipPacket)
 
   assert(ipPacket != NULL);
 
-  iph = (struct iphdr *)(ARM_NOWARN_ALIGN)ipPacket;
+  iph = (struct iphdr *)ARM_NOWARN_ALIGN(ipPacket);
 
   iph->ttl--;                   /* decrement ttl */
   sum = ntohs(iph->check) + 0x100;      /* increment checksum high byte */
@@ -211,7 +211,7 @@ DecreaseTtlAndUpdateHeaderChecksum(unsigned char *ipPacket)
 struct ip *
 GetIpHeader(unsigned char *encapsulationUdpData)
 {
-  return (struct ip *)(ARM_NOWARN_ALIGN)(encapsulationUdpData + ENCAP_HDR_LEN);
+  return (struct ip *)ARM_NOWARN_ALIGN(encapsulationUdpData + ENCAP_HDR_LEN);
 }                               /* GetIpHeader */
 
 /* -------------------------------------------------------------------------