You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/04/02 06:17:22 UTC
[incubator-nuttx] branch master updated: getnameinfo: Rename a
variable to avoid shadowing a global
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 804c719 getnameinfo: Rename a variable to avoid shadowing a global
804c719 is described below
commit 804c719319160e811f17df017635dd2295322281
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Apr 2 14:36:57 2020 +0900
getnameinfo: Rename a variable to avoid shadowing a global
---
libs/libc/netdb/lib_getnameinfo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/libc/netdb/lib_getnameinfo.c b/libs/libc/netdb/lib_getnameinfo.c
index d31b592..2a9614e 100644
--- a/libs/libc/netdb/lib_getnameinfo.c
+++ b/libs/libc/netdb/lib_getnameinfo.c
@@ -98,10 +98,10 @@ int getnameinfo(FAR const struct sockaddr *addr, socklen_t addrlen,
{
struct hostent hostent;
FAR struct hostent *res;
- int h_errno;
+ int error;
ret = gethostbyaddr_r(saddr, saddr_len, addr->sa_family, &hostent,
- host, hostlen, &res, &h_errno);
+ host, hostlen, &res, &error);
if (ret == OK)
{
@@ -119,7 +119,7 @@ int getnameinfo(FAR const struct sockaddr *addr, socklen_t addrlen,
}
else
{
- switch (h_errno)
+ switch (error)
{
case HOST_NOT_FOUND:
{