--------------------- PatchSet 11308 Date: 2007/03/07 16:15:53 Author: hno Branch: HEAD Tag: (none) Log: Simplify the epoll loop slightly, relying on compiler to optimize variable references Members: src/comm_epoll.c:1.27->1.28 Index: squid/src/comm_epoll.c =================================================================== RCS file: /cvsroot/squid/squid/src/comm_epoll.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- squid/src/comm_epoll.c 23 Oct 2006 11:22:21 -0000 1.27 +++ squid/src/comm_epoll.c 7 Mar 2007 16:15:53 -0000 1.28 @@ -1,6 +1,6 @@ /* - * $Id: comm_epoll.c,v 1.27 2006/10/23 11:22:21 hno Exp $ + * $Id: comm_epoll.c,v 1.28 2007/03/07 16:15:53 hno Exp $ * * DEBUG: section 5 Socket Functions * @@ -158,8 +158,6 @@ { int i; int num; - int fd; - struct epoll_event *cevents; if (epoll_fds == 0) { assert(shutting_down); @@ -180,9 +178,8 @@ if (num == 0) return COMM_TIMEOUT; - for (i = 0, cevents = events; i < num; i++, cevents++) { - fd = cevents->data.fd; - comm_call_handlers(fd, cevents->events & ~EPOLLOUT, cevents->events & ~EPOLLIN); + for (i = 0; i < num; i++) { + comm_call_handlers(events[i].data.fd, events[i].events & ~EPOLLOUT, events[i].events & ~EPOLLIN); } return COMM_OK;