From: Trond Norbye Date: Wed, 28 Jul 2010 18:48:00 +0000 (+0200) Subject: Fix coding style X-Git-Tag: 0.44~12^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=41e27ada59b0327b744272d77ed56ab8f884f271;p=m6w6%2Flibmemcached Fix coding style --- diff --git a/poll/poll.c b/poll/poll.c index 7f47b758..c5aa1115 100644 --- a/poll/poll.c +++ b/poll/poll.c @@ -19,16 +19,16 @@ int poll(struct pollfd fds[], nfds_t nfds, int tmo) FD_ZERO(&writefds); FD_ZERO(&errorfds); - int maxfd = 0; + int maxfd= 0; - for (int x = 0; x < nfds; ++x) + for (nfds_t x= 0; x < nfds; ++x) { if (fds[x].events & (POLLIN | POLLOUT)) { #ifndef WIN32 if (fds[x].fd > maxfd) { - maxfd = fds[x].fd; + maxfd= fds[x].fd; } #endif if (fds[x].events & POLLIN) @@ -42,23 +42,23 @@ int poll(struct pollfd fds[], nfds_t nfds, int tmo) } } - struct timeval timeout = { .tv_sec = tmo / 1000, - .tv_usec= (tmo % 1000) * 1000 }; - struct timeval *tp = &timeout; + struct timeval timeout= { .tv_sec = tmo / 1000, + .tv_usec= (tmo % 1000) * 1000 }; + struct timeval *tp= &timeout; if (tmo == -1) { - tp = NULL; + tp= NULL; } - int ret = select(maxfd + 1, &readfds, &writefds, &errorfds, tp); + int ret= select(maxfd + 1, &readfds, &writefds, &errorfds, tp); if (ret <= 0) { return ret; } /* Iterate through all of them because I need to clear the revent map */ - for (int x = 0; x < nfds; ++x) + for (nfds_t x= 0; x < nfds; ++x) { - fds[x].revents = 0; + fds[x].revents= 0; if (FD_ISSET(fds[x].fd, &readfds)) { fds[x].revents |= POLLIN;