evutil_new_addrinfo(struct sockaddr *sa, ev_socklen_t socklen,
const struct evutil_addrinfo *hints)
{
- size_t extra;
struct evutil_addrinfo *res;
EVUTIL_ASSERT(hints);
}
/* We're going to allocate extra space to hold the sockaddr. */
- extra = (hints->ai_family == PF_INET) ? sizeof(struct sockaddr_in) :
- sizeof(struct sockaddr_in6);
res = mm_calloc(1,sizeof(struct evutil_addrinfo)+socklen);
if (!res)
return NULL;
static int
select_resize(struct selectop *sop, int fdsz)
{
- int n_events, n_events_old;
-
fd_set *readset_in = NULL;
fd_set *writeset_in = NULL;
- n_events = (fdsz/sizeof(fd_mask)) * NFDBITS;
- n_events_old = (sop->event_fdsz/sizeof(fd_mask)) * NFDBITS;
-
if (sop->event_readset_in)
check_selectop(sop);