From 4599284110918305286f498de9638a36dd91d54b Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Mon, 7 Mar 2011 14:50:29 +0100 Subject: [PATCH] minor cleanup of 16-bit compressable macro and comment --- core/net/sicslowpan.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/net/sicslowpan.h b/core/net/sicslowpan.h index 33bcc1078..605bdb5f4 100644 --- a/core/net/sicslowpan.h +++ b/core/net/sicslowpan.h @@ -233,14 +233,13 @@ struct sicslowpan_addr_context { * \brief check whether we can compress the IID in * address 'a' to 16 bits. * This is used for unicast addresses only, and is true - * the address is on the format ::0000:00ff:fe00:XXXX + * if the address is on the format ::0000:00ff:fe00:XXXX + * NOTE: we currently assume 64-bits prefixes */ #define sicslowpan_is_iid_16_bit_compressable(a) \ ((((a)->u16[4]) == 0) && \ - (((a)->u8[10]) == 0) && \ - (((a)->u8[11]) == 0xff) && \ - (((a)->u8[12]) == 0xfe) && \ - (((a)->u8[13]) == 0)) + (((a)->u16[5]) == 0x00ff) && \ + (((a)->u16[6]) == 0xfe00)) /** * \brief check whether the 9-bit group-id of the