Skip to content

Commit 84fdcc8

Browse files
Merge pull request #88 from martinayotte/master
PR to fix F4 DNS Bug fix
2 parents 8c327ac + 17edc37 commit 84fdcc8

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

STM32F4/libraries/arduino_uip/Dns.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ int DNSClient::inet_aton(const char* aIPAddrString, IPAddress& aResult)
5858
{
5959
// See if we've been given a valid IP address
6060
const char* p =aIPAddrString;
61-
while (*p &&
62-
( (*p == '.') || (*p >= '0') || (*p <= '9') ))
61+
while (*p && ( (*p == '.') || ((*p >= '0') && (*p <= '9')) ))
6362
{
6463
p++;
6564
}

STM32F4/libraries/arduino_uip/utility/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef UTIL_H
22
#define UTIL_H
33

4-
#define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) )
4+
#define htons(x) ( ((x)<< 8 & 0xFF00) | ((x)>> 8 & 0x00FF) )
55
#define ntohs(x) htons(x)
66

77
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \

0 commit comments

Comments
 (0)