mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Rewrote the rimeaddr_copy() loop to use the ->u8 field instead of the ->u16 field (which now finally is removed)
This commit is contained in:
parent
6951d9d582
commit
50b1e60621
@ -33,7 +33,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: rimeaddr.c,v 1.8 2008/10/14 09:40:56 julienabeille Exp $
|
||||
* $Id: rimeaddr.c,v 1.9 2008/11/30 18:26:57 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -60,8 +60,8 @@ void
|
||||
rimeaddr_copy(rimeaddr_t *dest, const rimeaddr_t *src)
|
||||
{
|
||||
u8_t i;
|
||||
for(i = 0; i < RIMEADDR_SIZE / 2; i++) {
|
||||
dest->u16[i] = src->u16[i];
|
||||
for(i = 0; i < RIMEADDR_SIZE; i++) {
|
||||
dest->u8[i] = src->u8[i];
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@ -69,8 +69,8 @@ int
|
||||
rimeaddr_cmp(const rimeaddr_t *addr1, const rimeaddr_t *addr2)
|
||||
{
|
||||
u8_t i;
|
||||
for(i = 0; i < RIMEADDR_SIZE / 2; i++) {
|
||||
if(addr1->u16[i] != addr2->u16[i]) {
|
||||
for(i = 0; i < RIMEADDR_SIZE; i++) {
|
||||
if(addr1->u8[i] != addr2->u8[i]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user