@ -77,10 +77,10 @@ struct eloop_sock_table {
struct eloop_data {
int max_sock ;
in t count ; /* sum of all table counts */
size_ t count ; /* sum of all table counts */
# ifdef CONFIG_ELOOP_POLL
in t max_pollfd_map ; /* number of pollfds_map currently allocated */
in t max_poll_fds ; /* number of pollfds currently allocated */
size_ t max_pollfd_map ; /* number of pollfds_map currently allocated */
size_ t max_poll_fds ; /* number of pollfds currently allocated */
struct pollfd * pollfds ;
struct pollfd * * pollfds_map ;
# endif /* CONFIG_ELOOP_POLL */
@ -90,12 +90,12 @@ struct eloop_data {
# endif /* CONFIG_ELOOP_EPOLL || CONFIG_ELOOP_KQUEUE */
# ifdef CONFIG_ELOOP_EPOLL
int epollfd ;
in t epoll_max_event_num ;
size_ t epoll_max_event_num ;
struct epoll_event * epoll_events ;
# endif /* CONFIG_ELOOP_EPOLL */
# ifdef CONFIG_ELOOP_KQUEUE
int kqueuefd ;
in t kqueue_nevents ;
size_ t kqueue_nevents ;
struct kevent * kqueue_events ;
# endif /* CONFIG_ELOOP_KQUEUE */
struct eloop_sock_table readers ;
@ -268,7 +268,7 @@ static int eloop_sock_table_add_sock(struct eloop_sock_table *table,
# endif /* CONFIG_ELOOP_EPOLL */
# if defined(CONFIG_ELOOP_EPOLL) || defined(CONFIG_ELOOP_KQUEUE)
struct eloop_sock * temp_table ;
in t next ;
size_ t next ;
# endif /* CONFIG_ELOOP_EPOLL || CONFIG_ELOOP_KQUEUE */
struct eloop_sock * tmp ;
int new_max_sock ;
@ -282,7 +282,7 @@ static int eloop_sock_table_add_sock(struct eloop_sock_table *table,
return - 1 ;
# ifdef CONFIG_ELOOP_POLL
if ( new_max_sock > = eloop . max_pollfd_map ) {
if ( ( size_t ) new_max_sock > = eloop . max_pollfd_map ) {
struct pollfd * * nmap ;
nmap = os_realloc_array ( eloop . pollfds_map , new_max_sock + 50 ,
sizeof ( struct pollfd * ) ) ;
@ -295,7 +295,8 @@ static int eloop_sock_table_add_sock(struct eloop_sock_table *table,
if ( eloop . count + 1 > eloop . max_poll_fds ) {
struct pollfd * n ;
int nmax = eloop . count + 1 + 50 ;
size_t nmax = eloop . count + 1 + 50 ;
n = os_realloc_array ( eloop . pollfds , nmax ,
sizeof ( struct pollfd ) ) ;
if ( n = = NULL )