From dfdf4de8fa798a5d66267a1d11107cbe8f76bcc8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 22 Dec 2015 22:32:24 +1100 Subject: Fix void pointer arithmetic in the low level RNDIS demo. --- Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Demos') diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c index cc4e96132..e1d41ebde 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c @@ -244,7 +244,7 @@ void DecodeUDPHeader(void* InDataStart) void DecodeDHCPHeader(void* InDataStart) { #if !defined(NO_DECODE_DHCP) - uint8_t* DHCPOptions = (InDataStart + sizeof(DHCP_Header_t)); + uint8_t* DHCPOptions = ((uint8_t*)InDataStart + sizeof(DHCP_Header_t)); printf_P(PSTR(" \\\r\n DHCP\r\n")); -- cgit v1.2.3 From d0161e0a9bbc8d1a059a32e1c21fdd201cce1f3c Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 22 Dec 2015 22:34:50 +1100 Subject: Fixed low level RNDIS demo incorrectly setting the RNDIS state when a null packet filter was requested. --- Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Demos') diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c index 08ec74aa9..be13ce277 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c @@ -380,7 +380,7 @@ static bool ProcessNDISSet(uint32_t OId, void* SetData, uint16_t SetSize) CurrPacketFilter = *((uint32_t*)SetData); /* Set the RNDIS state to initialized if the packet filter is non-zero */ - CurrRNDISState = ((CurrPacketFilter) ? RNDIS_Data_Initialized : RNDIS_Data_Initialized); + CurrRNDISState = ((CurrPacketFilter) ? RNDIS_Data_Initialized : RNDIS_Initialized); return true; case OID_802_3_MULTICAST_LIST: -- cgit v1.2.3 From a86b502294ebda621fa8f3cce20a8238ea15eebc Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 22 Dec 2015 22:36:23 +1100 Subject: Fix additional void pointer arithmetic in the class driver RNDIS demo. --- Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Demos') diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c index 57e71cb77..c9db1f0ee 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c @@ -244,7 +244,7 @@ void DecodeUDPHeader(void* InDataStart) void DecodeDHCPHeader(void* InDataStart) { #if !defined(NO_DECODE_DHCP) - uint8_t* DHCPOptions = (InDataStart + sizeof(DHCP_Header_t)); + uint8_t* DHCPOptions = ((uint8_t*)InDataStart + sizeof(DHCP_Header_t)); printf_P(PSTR(" \\\r\n DHCP\r\n")); -- cgit v1.2.3