removed some void * casts in uip code

This commit is contained in:
joxe 2011-01-04 22:11:37 +00:00
parent 7a43b7d832
commit 65048c519c
2 changed files with 7 additions and 7 deletions

View file

@ -102,8 +102,8 @@ uip_icmp6_echo_request_input(void)
* The shift is equal to the length of the extension headers present
* Note: UIP_ICMP_BUF still points to the echo request at this stage
*/
memmove((void *)UIP_ICMP_BUF + UIP_ICMPH_LEN - uip_ext_len,
(void *)UIP_ICMP_BUF + UIP_ICMPH_LEN,
memmove((uint8_t *)UIP_ICMP_BUF + UIP_ICMPH_LEN - uip_ext_len,
(uint8_t *)UIP_ICMP_BUF + UIP_ICMPH_LEN,
(uip_len - UIP_IPH_LEN - UIP_ICMPH_LEN));
}
/* Below is important for the correctness of UIP_ICMP_BUF and the
@ -143,7 +143,7 @@ uip_icmp6_error_output(u8_t type, u8_t code, u32_t param) {
if(uip_len > UIP_LINK_MTU)
uip_len = UIP_LINK_MTU;
memmove((void *)UIP_ICMP6_ERROR_BUF + UIP_ICMP6_ERROR_LEN,
memmove((uint8_t *)UIP_ICMP6_ERROR_BUF + UIP_ICMP6_ERROR_LEN,
(void *)UIP_IP_BUF, uip_len - UIP_IPICMPH_LEN - UIP_ICMP6_ERROR_LEN);
UIP_IP_BUF->vtc = 0x60;

View file

@ -41,7 +41,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
* $Id: uip6.c,v 1.24 2010/10/19 18:29:04 adamdunkels Exp $
* $Id: uip6.c,v 1.25 2011/01/04 22:11:37 joxe Exp $
*
*/
@ -689,8 +689,8 @@ uip_reass(void)
/* Copy the fragment into the reassembly buffer, at the right
offset. */
memcpy((void *)FBUF + UIP_IPH_LEN + uip_ext_len + offset,
(void *)UIP_FRAG_BUF + UIP_FRAGH_LEN, len);
memcpy((uint8_t *)FBUF + UIP_IPH_LEN + uip_ext_len + offset,
(uint8_t *)UIP_FRAG_BUF + UIP_FRAGH_LEN, len);
/* Update the bitmap. */
if(offset >> 6 == (offset + len) >> 6) {
@ -1268,7 +1268,7 @@ uip_process(u8_t flag)
* RFC 2460 send error message parameterr problem, code unrecognized
* next header, pointing to the next header field
*/
uip_icmp6_error_output(ICMP6_PARAM_PROB, ICMP6_PARAMPROB_NEXTHEADER, (u32_t)((void *)uip_next_hdr - (void *)UIP_IP_BUF));
uip_icmp6_error_output(ICMP6_PARAM_PROB, ICMP6_PARAMPROB_NEXTHEADER, (u32_t)(uip_next_hdr - (uint8_t *)UIP_IP_BUF));
UIP_STAT(++uip_stat.ip.drop);
UIP_STAT(++uip_stat.ip.protoerr);
UIP_LOG("ip6: unrecognized header");