mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:06:09 +08:00
getnameinfo: Rename a variable to avoid shadowing a global
This commit is contained in:
committed by
Xiang Xiao
parent
4311e5e724
commit
804c719319
@@ -98,10 +98,10 @@ int getnameinfo(FAR const struct sockaddr *addr, socklen_t addrlen,
|
|||||||
{
|
{
|
||||||
struct hostent hostent;
|
struct hostent hostent;
|
||||||
FAR struct hostent *res;
|
FAR struct hostent *res;
|
||||||
int h_errno;
|
int error;
|
||||||
|
|
||||||
ret = gethostbyaddr_r(saddr, saddr_len, addr->sa_family, &hostent,
|
ret = gethostbyaddr_r(saddr, saddr_len, addr->sa_family, &hostent,
|
||||||
host, hostlen, &res, &h_errno);
|
host, hostlen, &res, &error);
|
||||||
|
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
{
|
{
|
||||||
@@ -119,7 +119,7 @@ int getnameinfo(FAR const struct sockaddr *addr, socklen_t addrlen,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (h_errno)
|
switch (error)
|
||||||
{
|
{
|
||||||
case HOST_NOT_FOUND:
|
case HOST_NOT_FOUND:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user