mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2229 from geky/nsapi-fix-iar
[nsapi] Fixed iar compilation issue with value initializerpull/2232/head
commit
fcd03f285d
|
@ -182,7 +182,7 @@ void SocketAddress::set_ip_address(const char *addr)
|
||||||
_addr.version = NSAPI_IPv6;
|
_addr.version = NSAPI_IPv6;
|
||||||
ipv6_from_address(_addr.bytes, addr);
|
ipv6_from_address(_addr.bytes, addr);
|
||||||
} else {
|
} else {
|
||||||
_addr = (nsapi_addr_t){};
|
_addr = nsapi_addr_t();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ void SocketAddress::_SocketAddress(NetworkStack *iface, const char *host, uint16
|
||||||
// DNS lookup
|
// DNS lookup
|
||||||
int err = iface->gethostbyname(this, host);
|
int err = iface->gethostbyname(this, host);
|
||||||
if (err) {
|
if (err) {
|
||||||
_addr = (nsapi_addr_t){};
|
_addr = nsapi_addr_t();
|
||||||
_port = 0;
|
_port = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
* @param addr Raw IP address
|
* @param addr Raw IP address
|
||||||
* @param port Optional 16-bit port
|
* @param port Optional 16-bit port
|
||||||
*/
|
*/
|
||||||
SocketAddress(nsapi_addr_t addr = (nsapi_addr_t){}, uint16_t port = 0);
|
SocketAddress(nsapi_addr_t addr = nsapi_addr_t(), uint16_t port = 0);
|
||||||
|
|
||||||
/** Create a SocketAddress from an IP address and port
|
/** Create a SocketAddress from an IP address and port
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue