summaryrefslogtreecommitdiff
path: root/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'select.c')
-rw-r--r--select.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/select.c b/select.c
index 77d42b89..527462ca 100644
--- a/select.c
+++ b/select.c
@@ -234,11 +234,14 @@ select_add(struct event_base *base, int fd, short old, short events, void *p)
if (sop->event_fds < fd) {
int fdsz = sop->event_fdsz;
- if (fdsz < sizeof(fd_mask))
- fdsz = sizeof(fd_mask);
+ if (fdsz < (int)sizeof(fd_mask))
+ fdsz = (int)sizeof(fd_mask);
+ /* In theory we should worry about overflow here. In
+ * reality, though, the highest fd on a unixy system will
+ * not overflow here. XXXX */
while (fdsz <
- (howmany(fd + 1, NFDBITS) * sizeof(fd_mask)))
+ (int) (howmany(fd + 1, NFDBITS) * sizeof(fd_mask)))
fdsz *= 2;
if (fdsz != sop->event_fdsz) {