Commit ef610433 authored by octal's avatar octal

Not using TRY_RET anymore for inet_ntoa as it returns a pointer

parent 23f211c4
......@@ -84,11 +84,13 @@ Address::Address(Ipv4 ip, Port port)
Address
Address::fromUnix(struct sockaddr* addr) {
struct sockaddr_in *in_addr = reinterpret_cast<struct sockaddr_in *>(addr);
std::string host = TRY_RET(inet_ntoa(in_addr->sin_addr));
char *host = inet_ntoa(in_addr->sin_addr);
assert(addr);
int port = ntohs(in_addr->sin_port);
return Address(std::move(host), port);
return Address(host, port);
}
std::string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment