From: Willy Tarreau Date: Fri, 21 Feb 2020 13:25:34 +0000 (+0100) Subject: CLEANUP: fd: remove the FD_EV_STATUS aggregate X-Git-Tag: v2.2-dev4~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f80fe832b1478ab7ef5dfd9736e8b2360943e369;p=thirdparty%2Fhaproxy.git CLEANUP: fd: remove the FD_EV_STATUS aggregate This was used only by fd_recv_state() and fd_send_state(), both of which are unused. This will not work anymore once recv and send flags start to differ, so let's remove this. --- diff --git a/include/proto/fd.h b/include/proto/fd.h index e9985b600b..9c7f66be2f 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -135,14 +135,6 @@ static inline void done_update_polling(int fd) } } -/* - * returns the FD's recv state (FD_EV_*) - */ -static inline int fd_recv_state(const int fd) -{ - return ((unsigned)fdtab[fd].state >> (4 * DIR_RD)) & FD_EV_STATUS; -} - /* * returns true if the FD is active for recv */ @@ -159,14 +151,6 @@ static inline int fd_recv_ready(const int fd) return (unsigned)fdtab[fd].state & FD_EV_READY_R; } -/* - * returns the FD's send state (FD_EV_*) - */ -static inline int fd_send_state(const int fd) -{ - return ((unsigned)fdtab[fd].state >> (4 * DIR_WR)) & FD_EV_STATUS; -} - /* * returns true if the FD is active for send */ diff --git a/include/types/fd.h b/include/types/fd.h index ffa1e07871..540ddcc5de 100644 --- a/include/types/fd.h +++ b/include/types/fd.h @@ -64,10 +64,6 @@ enum { #define FD_EV_SHUT_W_BIT 6 #define FD_EV_ERR_W_BIT 7 -#define FD_EV_STATUS (FD_EV_ACTIVE | FD_EV_READY | FD_EV_SHUT | FD_EV_ERR) -#define FD_EV_STATUS_R (FD_EV_STATUS) -#define FD_EV_STATUS_W (FD_EV_STATUS << 4) - #define FD_EV_ACTIVE_R (FD_EV_ACTIVE) #define FD_EV_ACTIVE_W (FD_EV_ACTIVE << 4) #define FD_EV_ACTIVE_RW (FD_EV_ACTIVE_R | FD_EV_ACTIVE_W)