Skip to content

Commit 575bf30

Browse files
authored
Doing the proper error check after calling getaddrinfo
Differential Revision: D73746837 Pull Request resolved: #434
1 parent a1fb5d7 commit 575bf30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gloo/transport/tcp/device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static void lookupAddrForHostname(struct attr& attr) {
9696
int bind_errno = 0;
9797
std::string bind_addr;
9898
auto rv = getaddrinfo(attr.hostname.data(), nullptr, &hints, &result);
99-
GLOO_ENFORCE_NE(rv, -1);
99+
GLOO_ENFORCE_EQ(rv, 0);
100100
struct addrinfo* rp;
101101
for (rp = result; rp != nullptr; rp = rp->ai_next) {
102102
auto fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);

0 commit comments

Comments
 (0)