提交 7943ed75 编写于 作者: O openharmony_ci 提交者: Gitee

!103 getaddrinfo和freeaddrinfo已经支持,去除unsupport打印

Merge pull request !103 from lnlan/rm_unsupport
#include <stdlib.h>
#include <stddef.h>
#include <netdb.h>
#include "lookup.h"
#include "lock.h"
#include <unsupported_api.h>
void freeaddrinfo(struct addrinfo *p)
{
size_t cnt;
unsupported_api(__FUNCTION__);
for (cnt=1; p->ai_next; cnt++, p=p->ai_next);
struct aibuf *b = (void *)((char *)p - offsetof(struct aibuf, ai));
b -= b->slot;
LOCK(b->lock);
if (!(b->ref -= cnt)) free(b);
else UNLOCK(b->lock);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册