MCPcopy Create free account
hub / github.com/git/git / ai_name

Function ai_name

connect.c:771–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769#ifndef NO_IPV6
770
771static const char *ai_name(const struct addrinfo *ai)
772{
773 static char addr[NI_MAXHOST];
774 if (getnameinfo(ai->ai_addr, ai->ai_addrlen, addr, sizeof(addr), NULL, 0,
775 NI_NUMERICHOST) != 0)
776 xsnprintf(addr, sizeof(addr), "(unknown)");
777
778 return addr;
779}
780
781/*
782 * Returns a connected socket() fd, or else die()s.

Callers 1

git_tcp_connect_sockFunction · 0.85

Calls 1

xsnprintfFunction · 0.85

Tested by

no test coverage detected