ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_epoll.c
(Generate patch)

Comparing libev/ev_epoll.c (file contents):
Revision 1.9 by root, Thu Nov 1 13:11:12 2007 UTC vs.
Revision 1.10 by root, Fri Nov 2 11:02:23 2007 UTC

79 (events [i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0) 79 (events [i].events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
80 | (events [i].events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0) 80 | (events [i].events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0)
81 ); 81 );
82 82
83 /* if the receive array was full, increase its size */ 83 /* if the receive array was full, increase its size */
84 if (eventcnt == eventmax) 84 if (expect_false (eventcnt == eventmax))
85 { 85 {
86 free (events); 86 free (events);
87 eventmax += eventmax >> 1; 87 eventmax = array_roundsize (events, eventmax << 1);
88 events = malloc (sizeof (struct epoll_event) * eventmax); 88 events = malloc (sizeof (struct epoll_event) * eventmax);
89 } 89 }
90} 90}
91 91
92static void 92static void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines