aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel/RNDISEthernet/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/LowLevel/RNDISEthernet/Lib')
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c2
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c
index 7131ac2b0..044b0695b 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c
+++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c
@@ -125,7 +125,7 @@ uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes)
uint16_t* Words = (uint16_t*)Data;
uint32_t Checksum = 0;
- for (uint8_t CurrWord = 0; CurrWord < (Bytes >> 1); CurrWord++)
+ for (uint16_t CurrWord = 0; CurrWord < (Bytes >> 1); CurrWord++)
Checksum += Words[CurrWord];
while (Checksum & 0xFFFF0000)
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
index 8ec8fca1d..76031490d 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
+++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
@@ -605,7 +605,7 @@ static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddre
Checksum += SwapEndian_16(PROTOCOL_TCP);
Checksum += SwapEndian_16(TCPOutSize);
- for (uint8_t CurrWord = 0; CurrWord < (TCPOutSize >> 1); CurrWord++)
+ for (uint16_t CurrWord = 0; CurrWord < (TCPOutSize >> 1); CurrWord++)
Checksum += ((uint16_t*)TCPHeaderOutStart)[CurrWord];
if (TCPOutSize & 0x01)