aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/network.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-13 19:52:01 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-13 19:52:01 +0100
commit952d7e4aa9f86bd784c0fbef3ce8611ccafe8b6a (patch)
tree59216f3bd6a1fae1875b1c36c5a726edada38d44 /FICS/network.c
parent4367c75afebaebcbf585fe03e3c07def9e0e9ae7 (diff)
Reformatted net_flush_connection()
Diffstat (limited to 'FICS/network.c')
-rw-r--r--FICS/network.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/FICS/network.c b/FICS/network.c
index 592a977..de9d99c 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -155,23 +155,25 @@ PRIVATE void net_flush_all_connections(void)
}
}
-PRIVATE void net_flush_connection(int fd)
+PRIVATE void
+net_flush_connection(int fd)
{
- int which;
- fd_set writefds;
- struct timeval to;
+ fd_set writefds;
+ int which;
+ struct timeval to;
- if (((which = findConnection(fd)) >= 0) && (con[which].sndbufpos)) {
- FD_ZERO(&writefds);
- FD_SET(con[which].outFd, &writefds);
- to.tv_usec = 0;
- to.tv_sec = 0;
- select(no_file, NULL, &writefds, NULL, &to);
- if (FD_ISSET(con[which].outFd, &writefds)) {
- net_flushme(which);
- }
- }
- return;
+ if ((which = findConnection(fd)) >= 0 && con[which].sndbufpos) {
+ FD_ZERO(&writefds);
+ FD_SET(con[which].outFd, &writefds);
+
+ to.tv_usec = 0;
+ to.tv_sec = 0;
+
+ select(no_file, NULL, &writefds, NULL, &to);
+
+ if (FD_ISSET(con[which].outFd, &writefds))
+ net_flushme(which);
+ }
}
PRIVATE int