Skip to content

Commit

Permalink
CLEANUP: protocol: no longer initialize .receivers nor .nb_receivers
Browse files Browse the repository at this point in the history
Protocol definitions no longer need to initialize these internal fields,
as they're now properly initialized during protocol registration.
  • Loading branch information
wtarreau committed Aug 21, 2024
1 parent 1cb3b0b commit 9911b53
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions src/proto_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ struct protocol proto_quic4 = {
.rx_unbind = sock_unbind,
.rx_listening = quic_sock_accepting_conn,
.default_iocb = quic_lstnr_sock_fd_iocb,
.receivers = LIST_HEAD_INIT(proto_quic4.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down Expand Up @@ -151,8 +149,6 @@ struct protocol proto_quic6 = {
.rx_unbind = sock_unbind,
.rx_listening = quic_sock_accepting_conn,
.default_iocb = quic_lstnr_sock_fd_iocb,
.receivers = LIST_HEAD_INIT(proto_quic6.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/proto_sockpair.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ struct protocol proto_sockpair = {
.rx_unbind = sock_unbind,
.rx_listening = sockpair_accepting_conn,
.default_iocb = sock_accept_iocb,
.receivers = LIST_HEAD_INIT(proto_sockpair.receivers),
.nb_receivers = 0,
};

INITCALL1(STG_REGISTER, protocol_register, &proto_sockpair);
Expand Down
4 changes: 0 additions & 4 deletions src/proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ struct protocol proto_tcpv4 = {
.rx_unbind = sock_unbind,
.rx_listening = sock_accepting_conn,
.default_iocb = sock_accept_iocb,
.receivers = LIST_HEAD_INIT(proto_tcpv4.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down Expand Up @@ -140,8 +138,6 @@ struct protocol proto_tcpv6 = {
.rx_unbind = sock_unbind,
.rx_listening = sock_accepting_conn,
.default_iocb = sock_accept_iocb,
.receivers = LIST_HEAD_INIT(proto_tcpv6.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/proto_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ struct protocol proto_udp4 = {
.rx_enable = sock_enable,
.rx_disable = sock_disable,
.rx_unbind = sock_unbind,
.receivers = LIST_HEAD_INIT(proto_udp4.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down Expand Up @@ -109,8 +107,6 @@ struct protocol proto_udp6 = {
.rx_enable = sock_enable,
.rx_disable = sock_disable,
.rx_unbind = sock_unbind,
.receivers = LIST_HEAD_INIT(proto_udp6.receivers),
.nb_receivers = 0,
#ifdef SO_REUSEPORT
.flags = PROTO_F_REUSEPORT_SUPPORTED,
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/proto_uxdg.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ struct protocol proto_uxdg = {
.rx_enable = sock_enable,
.rx_disable = sock_disable,
.rx_unbind = sock_unbind,
.receivers = LIST_HEAD_INIT(proto_uxdg.receivers),
.nb_receivers = 0,
};

INITCALL1(STG_REGISTER, protocol_register, &proto_uxdg);
Expand Down
2 changes: 0 additions & 2 deletions src/proto_uxst.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ struct protocol proto_uxst = {
.rx_unbind = sock_unbind,
.rx_listening = sock_accepting_conn,
.default_iocb = sock_accept_iocb,
.receivers = LIST_HEAD_INIT(proto_uxst.receivers),
.nb_receivers = 0,
};

INITCALL1(STG_REGISTER, protocol_register, &proto_uxst);
Expand Down

0 comments on commit 9911b53

Please sign in to comment.