epoll - funky copied code?

From: Robert Collins <robertc@dont-contact.us>
Date: Sat, 12 Aug 2006 09:51:27 +1000

    for (;;) {
        num = epoll_wait(kdpfd, pevents, SQUID_MAXFD, msec);
        statCounter.select_loops++;

        if (num >= 0)
            break;

        if (ignoreErrno(errno))
            break;

        getCurrentTime();

        PROF_stop(comm_check_incoming);

        return COMM_ERROR;
    }

Isn't this equivalent to
{
   num = epoll_wait(kdpfd, pevents, SQUID_MAXFD, msec);
   statCounter.select_loops++;
   if (num < 0 && !ignoreErrno(errno)) {
       getCurrentTime();
       PROF_stop(comm_check_incoming);
       return COMM_ERROR;
}

That is - isn't the for loop completely irrelevant ?

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Received on Fri Aug 11 2006 - 18:11:39 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:03 MDT