mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
Fix an assertion
This commit is contained in:
parent
299782e8ec
commit
1cd4ef1730
1 changed files with 2 additions and 0 deletions
|
|
@ -82,6 +82,8 @@ FAR struct hostent *gethostbyaddr(FAR const void *addr, socklen_t len, int type)
|
|||
int ret;
|
||||
|
||||
DEBUGASSERT(addr != NULL);
|
||||
DEBUGASSERT(type == AF_INET || type == AF_INET6);
|
||||
|
||||
ret = gethostbyaddr_r(addr, len, type, &g_hostent, g_hostbuffer,
|
||||
CONFIG_NETDB_BUFSIZE, &h_errno);
|
||||
return ret == 0 ? &g_hostent : NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue