]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fd: remove the FD_EV_STATUS aggregate
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2020 13:25:34 +0000 (14:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Feb 2020 06:42:29 +0000 (07:42 +0100)
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.

include/proto/fd.h
include/types/fd.h

index e9985b600b35dcbe7dbf748001fb7c9d16111d7a..9c7f66be2fc6efbaa712b2bb888d86766dca4614 100644 (file)
@@ -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
  */
index ffa1e0787194aea82e6b551c4900e0cf6c583864..540ddcc5deb300d7849611b4173d9fc15b92a60c 100644 (file)
@@ -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)