[MINOR] change type of fdtab[]->owner to void*
The owner of an fd was initially a task but this was sometimes
casted to a (struct listener *). We'll soon need more types,
so void* is more appropriate.
diff --git a/src/client.c b/src/client.c
index 5ff1abe..1f577d1 100644
--- a/src/client.c
+++ b/src/client.c
@@ -60,7 +60,7 @@
* It returns 0.
*/
int event_accept(int fd) {
- struct listener *l = (struct listener *)fdtab[fd].owner;
+ struct listener *l = fdtab[fd].owner;
struct proxy *p = (struct proxy *)l->private; /* attached frontend */
struct session *s;
struct http_txn *txn;
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 0cf1e0e..32c4994 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -263,7 +263,7 @@
fdtab[fd].cb[DIR_RD].f = listener->accept;
fdtab[fd].cb[DIR_WR].f = NULL; /* never called */
fdtab[fd].cb[DIR_RD].b = fdtab[fd].cb[DIR_WR].b = NULL;
- fdtab[fd].owner = (struct task *)listener; /* reference the listener instead of a task */
+ fdtab[fd].owner = listener; /* reference the listener instead of a task */
fdtab[fd].state = FD_STLISTEN;
fdtab[fd].peeraddr = NULL;
fdtab[fd].peerlen = 0;
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 4eab55e..dc2b933 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -266,7 +266,7 @@
fdtab[fd].cb[DIR_RD].f = listener->accept;
fdtab[fd].cb[DIR_WR].f = NULL; /* never called */
fdtab[fd].cb[DIR_RD].b = fdtab[fd].cb[DIR_WR].b = NULL;
- fdtab[fd].owner = (struct task *)listener; /* reference the listener instead of a task */
+ fdtab[fd].owner = listener; /* reference the listener instead of a task */
fdtab[fd].state = FD_STLISTEN;
fdtab[fd].peeraddr = NULL;
fdtab[fd].peerlen = 0;
@@ -358,7 +358,7 @@
* as with TCP which can fall under attack.
*/
int uxst_event_accept(int fd) {
- struct listener *l = (struct listener *)fdtab[fd].owner;
+ struct listener *l = fdtab[fd].owner;
struct session *s;
struct task *t;
int cfd;