mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
CLEANUP: fd: slightly simplify up _fd_delete_orphan()
Let's release the port range earlier so that all zeroes are grouped together and that the compiler can slightly simplify the code.
This commit is contained in:
parent
6cf13119e2
commit
2d4232901c
3
src/fd.c
3
src/fd.c
@ -309,6 +309,8 @@ void _fd_delete_orphan(int fd)
|
||||
}
|
||||
if (cur_poller.clo)
|
||||
cur_poller.clo(fd);
|
||||
|
||||
port_range_release_port(fdinfo[fd].port_range, fdinfo[fd].local_port);
|
||||
polled_mask[fd].poll_recv = polled_mask[fd].poll_send = 0;
|
||||
|
||||
fdtab[fd].state = 0;
|
||||
@ -316,7 +318,6 @@ void _fd_delete_orphan(int fd)
|
||||
#ifdef DEBUG_FD
|
||||
fdtab[fd].event_count = 0;
|
||||
#endif
|
||||
port_range_release_port(fdinfo[fd].port_range, fdinfo[fd].local_port);
|
||||
fdinfo[fd].port_range = NULL;
|
||||
fdtab[fd].owner = NULL;
|
||||
fdtab[fd].exported = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user