mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 23:03:55 +00:00
Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3). POSIX standard does not require a sa_len field in sockaddr struct, hence such requirement will cause problem for portability. PR: standards/80008 Requested by: Xin Liu <lx@knight.6test.edu.cn> Reviewed by: freebsd-standards (das) MFC After: 2 weeks
This commit is contained in:
parent
8318eaae8b
commit
f5d25e4900
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145178
|
@ -109,8 +109,10 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||||
if (sa == NULL)
|
if (sa == NULL)
|
||||||
return EAI_FAIL;
|
return EAI_FAIL;
|
||||||
|
|
||||||
|
#ifdef BSD4_4
|
||||||
if (sa->sa_len != salen)
|
if (sa->sa_len != salen)
|
||||||
return EAI_FAIL;
|
return EAI_FAIL;
|
||||||
|
#endif
|
||||||
|
|
||||||
family = sa->sa_family;
|
family = sa->sa_family;
|
||||||
for (i = 0; afdl[i].a_af; i++)
|
for (i = 0; afdl[i].a_af; i++)
|
||||||
|
|
Loading…
Reference in a new issue