From cc9445624fd8e8b262ba5a528bb8c6e461e2f803 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 3 Apr 2017 16:17:10 -0600 Subject: [PATCH] 6loWPAN: Correct a couple of tiny but fatal bugs. --- net/sixlowpan/sixlowpan_framer.c | 2 +- net/sixlowpan/sixlowpan_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sixlowpan/sixlowpan_framer.c b/net/sixlowpan/sixlowpan_framer.c index d0efa291d4..ad502ebbc9 100644 --- a/net/sixlowpan/sixlowpan_framer.c +++ b/net/sixlowpan/sixlowpan_framer.c @@ -294,7 +294,7 @@ static void sixlowpan_setup_params(FAR struct ieee802154_driver_s *ieee, /* Initialize all prameters to all zero */ - memset(¶ms, 0, sizeof(params)); + memset(params, 0, sizeof(params)); /* Reset to an empty frame */ diff --git a/net/sixlowpan/sixlowpan_utils.c b/net/sixlowpan/sixlowpan_utils.c index 7dd4e9e35c..1ec8eec2b6 100644 --- a/net/sixlowpan/sixlowpan_utils.c +++ b/net/sixlowpan/sixlowpan_utils.c @@ -149,7 +149,7 @@ void sixlowpan_rimefromip(const net_ipv6addr_t ipaddr, { /* REVISIT: See notes about 2 byte addresses in sixlowpan_ipfromrime() */ - DEBUGASSERT(ipaddr[0] == 0xfe80); + DEBUGASSERT(ipaddr[0] == HTONS(0xfe80)); memcpy(rime, &ipaddr[4], CONFIG_NET_6LOWPAN_RIMEADDR_SIZE); rime->u8[0] ^= 0x02;