commit 30c11b23133e98e95303423d44193e4835a3c676 from: Florian Westphal date: Tue Aug 30 13:38:16 2005 UTC use size_t for array length variables commit - b7033e147890b3ad0d7fe1520a1db4e4ce040c7b commit + 30c11b23133e98e95303423d44193e4835a3c676 blob - 6e6f5985afab1e1a934a557bc352e93aa9a7bc02 blob + 96672da691a1b858f70eb2723a44898f2991cc44 --- src/ngircd/io.c +++ src/ngircd/io.c @@ -12,7 +12,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: io.c,v 1.9 2005/08/29 13:58:54 fw Exp $"; +static char UNUSED id[] = "$Id: io.c,v 1.10 2005/08/30 13:38:16 fw Exp $"; #include #include @@ -298,7 +298,7 @@ io_event_add_kqueue(int fd, short what) { struct kevent kev; short filter = 0; - unsigned int len = array_length(&io_evcache, sizeof kev); + size_t len = array_length(&io_evcache, sizeof kev); if (what & IO_WANTREAD) filter = EVFILT_READ; @@ -529,7 +529,7 @@ io_dispatch_kqueue(struct timeval *tv) ts.tv_nsec = tv->tv_usec * 1000; do { - newevents_len = array_length(&io_evcache, sizeof (struct kevent)); + newevents_len = (int) array_length(&io_evcache, sizeof (struct kevent)); newevents = (newevents_len > 0) ? array_start(&io_evcache) : NULL; assert(newevents_len >= 0); if (newevents_len < 0)