TAILQ_FOREACH(ev, &eventqueue, ev_next)
TAILQ_FOREACH(ev, &base->eventqueue, ev_next)
select_recalc(void *arg, int max){	struct selectop *sop = arg;	fd_set *readset, *writeset;	struct event *ev;	int fdsz;	if (sop->event_fds < max)		sop->event_fds = max;	if (!sop->event_fds) {		TAILQ_FOREACH(ev, &eventqueue, ev_next)			if (ev->ev_fd > sop->event_fds)				sop->event_fds = ev->ev_fd;	}	fdsz = howmany(sop->event_fds + 1, NFDBITS) * sizeof(fd_mask);	if (fdsz > sop->event_fdsz) {		if ((readset = realloc(sop->event_readset, fdsz)) == NULL) {			log_error("malloc");			return (-1);		}		if ((writeset = realloc(sop->event_writeset, fdsz)) == NULL) {			log_error("malloc");			free(readset);			return (-1);		}		memset((char *)readset + sop->event_fdsz, 0,		    fdsz - sop->event_fdsz);		memset((char *)writeset + sop->event_fdsz, 0,		    fdsz - sop->event_fdsz);		sop->event_readset = readset;		sop->event_writeset = writeset;		sop->event_fdsz = fdsz;	}	return (evsignal_recalc(&sop->evsigmask));}