Merge pull request #2229 from geky/nsapi-fix-iar

[nsapi] Fixed iar compilation issue with value initializer
pull/2232/head
Sam Grove 2016-07-22 17:22:56 -05:00 committed by GitHub
commit fcd03f285d
2 changed files with 3 additions and 3 deletions

View File

@ -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;
} }
} }

View File

@ -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
* *