pointer arithmetic bug; from Nick Mathewson

svn:r157
This commit is contained in:
Niels Provos 2005-04-26 07:17:42 +00:00
parent 0f5b0389e5
commit dfe4e16e13

2
poll.c
View File

@ -166,7 +166,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
event_warn("realloc");
return (-1);
}
memset(pop->idxplus1_by_fd+sizeof(int)*fd_count,
memset(pop->idxplus1_by_fd + fd_count,
0, sizeof(int)*(new_count-fd_count));
fd_count = pop->fd_count = new_count;
}