REORG/MEDIUM: fd: remove FD_STCLOSE from struct fdtab
In an attempt to get rid of fdtab[].state, and to move the relevant
parts to the connection struct, we remove the FD_STCLOSE state which
can easily be deduced from the <owner> pointer as there is a 1:1 match.
diff --git a/src/fd.c b/src/fd.c
index 80bddd6..7958087 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -41,9 +41,9 @@
port_range_release_port(fdinfo[fd].port_range, fdinfo[fd].local_port);
fdinfo[fd].port_range = NULL;
close(fd);
- fdtab[fd].state = FD_STCLOSE;
+ fdtab[fd].owner = NULL;
- while ((maxfd-1 >= 0) && (fdtab[maxfd-1].state == FD_STCLOSE))
+ while ((maxfd-1 >= 0) && !fdtab[maxfd-1].owner)
maxfd--;
}