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
Revision 175:2d7aa004d881, committed 2020-12-24
- Comitter:
- andrewboyson
- Date:
- Thu Dec 24 19:17:06 2020 +0000
- Parent:
- 174:60e5ab296671
- Child:
- 176:7eb916c22084
- Commit message:
- Corrected ndp uint32 decode routine
Changed in this revision
| ip6/icmp/ndp/ndp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/ip6/icmp/ndp/ndp.c Wed Dec 23 19:43:09 2020 +0000
+++ b/ip6/icmp/ndp/ndp.c Thu Dec 24 19:17:06 2020 +0000
@@ -85,11 +85,10 @@
static uint32_t decodeUint32(char* p)
{
- uint32_t value;
- value = *p++;
- value = value << 8 | *p++;
- value = value << 8 | *p++;
- value = value << 8 | *p;
+ uint32_t value = *p++;
+ value <<= 8; value += *p++;
+ value <<= 8; value += *p++;
+ value <<= 8; value += *p++;
return value;
}
static int decodeOption(char* p, char* srcMac, char* dstMac)