MCPcopy Create free account
hub / github.com/RsyncProject/rsync / check_hostent_err

Function check_hostent_err

lib/getaddrinfo.c:60–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58#endif
59
60static int check_hostent_err(struct hostent *hp)
61{
62#ifndef INET6
63 extern int h_errno;
64#endif
65 if (!hp) {
66 switch (h_errno) {
67 case HOST_NOT_FOUND:
68 case NO_DATA:
69 return EAI_NONAME;
70 case TRY_AGAIN:
71 return EAI_AGAIN;
72 case NO_RECOVERY:
73 default:
74 return EAI_FAIL;
75 }
76 }
77 if (!hp->h_name || hp->h_addrtype != AF_INET) {
78 return EAI_FAIL;
79 }
80 return 0;
81}
82
83static char *canon_name_from_hostent(struct hostent *hp,
84 int *perr)

Callers 3

canon_name_from_hostentFunction · 0.85
getaddr_info_nameFunction · 0.85
gethostnameinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected