Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: ip6/icmp/ndp/ndp.c
- Revision:
- 173:9bc30cd82a76
- Parent:
- 172:9bc3c7b2cca1
- Child:
- 175:2d7aa004d881
--- a/ip6/icmp/ndp/ndp.c Wed Dec 16 17:33:22 2020 +0000
+++ b/ip6/icmp/ndp/ndp.c Wed Dec 23 09:52:47 2020 +0000
@@ -85,11 +85,11 @@
static uint32_t decodeUint32(char* p)
{
- uint32_t value = 0;
- value |= *p++ << 24;
- value |= *p++ << 12;
- value |= *p++ << 8;
- value |= *p++ << 0;
+ uint32_t value;
+ value = *p++;
+ value = value << 8 | *p++;
+ value = value << 8 | *p++;
+ value = value << 8 | *p;
return value;
}
static int decodeOption(char* p, char* srcMac, char* dstMac)