1
0
mirror of https://passt.top/passt synced 2024-09-30 19:15:47 +00:00

Remove pointless macro parameters in CALL_PROTO_HANDLER

The 'c' parameter is always passed exactly 'c'.  The 'now' parameter is
always passed exactly 'now'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2024-06-06 20:09:44 +10:00 committed by Stefano Brivio
parent c80fa6a6bb
commit 7094b91d10

View File

@ -84,7 +84,7 @@ static_assert(ARRAY_SIZE(epoll_type_str) == EPOLL_NUM_TYPES,
*/ */
static void post_handler(struct ctx *c, const struct timespec *now) static void post_handler(struct ctx *c, const struct timespec *now)
{ {
#define CALL_PROTO_HANDLER(c, now, lc, uc) \ #define CALL_PROTO_HANDLER(lc, uc) \
do { \ do { \
extern void \ extern void \
lc ## _defer_handler (struct ctx *c) \ lc ## _defer_handler (struct ctx *c) \
@ -103,9 +103,9 @@ static void post_handler(struct ctx *c, const struct timespec *now)
} while (0) } while (0)
/* NOLINTNEXTLINE(bugprone-branch-clone): intervals can be the same */ /* NOLINTNEXTLINE(bugprone-branch-clone): intervals can be the same */
CALL_PROTO_HANDLER(c, now, tcp, TCP); CALL_PROTO_HANDLER(tcp, TCP);
/* NOLINTNEXTLINE(bugprone-branch-clone): intervals can be the same */ /* NOLINTNEXTLINE(bugprone-branch-clone): intervals can be the same */
CALL_PROTO_HANDLER(c, now, udp, UDP); CALL_PROTO_HANDLER(udp, UDP);
flow_defer_handler(c, now); flow_defer_handler(c, now);
#undef CALL_PROTO_HANDLER #undef CALL_PROTO_HANDLER