mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Fix an assertion
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user