From e4775d41620999b415cd68754897f5132426a00d Mon Sep 17 00:00:00 2001 From: jani Date: Tue, 15 Apr 2003 14:56:03 +0000 Subject: [PATCH] alignment fix from Marc Boucher --- src/core/ipv4/ip_frag.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/ipv4/ip_frag.c b/src/core/ipv4/ip_frag.c index f40e3a1e..7a12c479 100644 --- a/src/core/ipv4/ip_frag.c +++ b/src/core/ipv4/ip_frag.c @@ -93,6 +93,7 @@ static u8_t ip_reasstmr; static void ip_reass_timer(void *arg) { + (void)arg; if(ip_reasstmr > 1) { ip_reasstmr--; sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL); @@ -276,7 +277,7 @@ nullreturn: } #define MAX_MTU 1500 -static u8_t buf[MAX_MTU]; +static u8_t buf[MEM_ALIGN_SIZE(MAX_MTU)]; /** * Fragment an IP packet if too large @@ -301,7 +302,7 @@ ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest) /* Get a RAM based MTU sized pbuf */ rambuf = pbuf_alloc(PBUF_LINK, 0, PBUF_REF); rambuf->tot_len = rambuf->len = mtu; - rambuf->payload = buf; + rambuf->payload = MEM_ALIGN((void *)buf); /* Copy the IP header in it */