Made rimeaddr_t pointers const when they should be

This commit is contained in:
adamdunkels 2009-11-08 19:42:59 +00:00
parent 56218aba3b
commit 01442326b2
7 changed files with 22 additions and 19 deletions

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: shell-netperf.c,v 1.2 2009/11/04 07:48:18 adamdunkels Exp $
* $Id: shell-netperf.c,v 1.3 2009/11/08 19:43:00 adamdunkels Exp $
*/
/**
@ -117,7 +117,8 @@ static void
memcpy_misaligned(void *dest, const void *source, int len)
{
int i;
u8_t *destptr, *sourceptr;
uint8_t *destptr;
const uint8_t *sourceptr;
if(((int)dest & 1) == 1 ||
((int)source & 1) == 1) {
destptr = dest;
@ -316,7 +317,7 @@ process_incoming_packet(void)
struct datapath_msg msg_copy;
now = timesynch_time();
memcpy_misaligned(&msg_copy, (u8_t *)msg, sizeof(msg_copy));
memcpy_misaligned(&msg_copy, (uint8_t *)msg, sizeof(msg_copy));
stats.received++;
stats.total_tx_latency += msg_copy.rx - msg_copy.tx;
stats.total_rx_latency += now - msg_copy.rx;