aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/network.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/FICS/network.c b/FICS/network.c
index de9d99c..be8a8ae 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -134,25 +134,30 @@ PRIVATE void net_flushme(int which)
}
}
-PRIVATE void net_flush_all_connections(void)
+PRIVATE void
+net_flush_all_connections(void)
{
- int which;
- fd_set writefds;
- struct timeval to;
-
- FD_ZERO(&writefds);
- for (which = 0; which < MAX_PLAYER; which++)
- if (con[which].status == NETSTAT_CONNECTED && con[which].sndbufpos)
- FD_SET(con[which].outFd, &writefds);
-
- to.tv_usec = 0;
- to.tv_sec = 0;
- select(no_file, NULL, &writefds, NULL, &to);
- for (which = 0; which < MAX_PLAYER; which++) {
- if (FD_ISSET(con[which].outFd, &writefds)) {
- net_flushme(which);
- }
- }
+ fd_set writefds;
+ int which;
+ struct timeval to;
+
+ FD_ZERO(&writefds);
+
+ for (which = 0; which < MAX_PLAYER; which++) {
+ if (con[which].status == NETSTAT_CONNECTED &&
+ con[which].sndbufpos)
+ FD_SET(con[which].outFd, &writefds);
+ }
+
+ to.tv_usec = 0;
+ to.tv_sec = 0;
+
+ select(no_file, NULL, &writefds, NULL, &to);
+
+ for (which = 0; which < MAX_PLAYER; which++) {
+ if (FD_ISSET(con[which].outFd, &writefds))
+ net_flushme(which);
+ }
}
PRIVATE void