From 8053e2c353323212c1418a4571df1b818e429d84 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Wed, 12 Sep 2012 14:46:19 +0200 Subject: [PATCH] Workaround for an odd type inference problem associated with the IAR compiler. Patch by Vilhelm Jutvik. --- core/net/uip6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/uip6.c b/core/net/uip6.c index 942e0dfae..021cbf888 100644 --- a/core/net/uip6.c +++ b/core/net/uip6.c @@ -508,7 +508,7 @@ remove_ext_hdr(void) if(uip_ext_len > 0) { PRINTF("Cutting ext-header before processing (extlen: %d, uiplen: %d)\n", uip_ext_len, uip_len); - if(uip_len - UIP_IPH_LEN - uip_ext_len < 0) { + if(uip_len < UIP_IPH_LEN + uip_ext_len) { PRINTF("ERROR: uip_len too short compared to ext len\n"); uip_ext_len = 0; uip_len = 0;