From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 198985A004F for ; Thu, 06 Jun 2024 12:10:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1717668601; bh=dFAYq279AhG/iKkdetgAPDKUy0ykNbDfuHHM7HkKB4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nq88CPOaFIc/dhr1ay/aM3H1XBC3m+aEWGy51f0I/gbcNk6oyVfvJ8TTHIKQ/kvUk 2JHU6KNHsTTnXyN4TPlazR50Qxn6HhAxYwGp2nZg1MVtSL2JWrsJO68DXXrv3LUb/x wpVjT+T1ycj8isIR6xbewfdnOSuI1+Onr3Bs1y6QMZPYdU6mdmWvlbLpg8Pf0zqIW0 nGZRj2rSfkCJpJ8Dr3h4xxCAn1WGQ4UT1xK7wqPE7efo7WZnj4HtxHysHCDDMTqhzZ Nm8wD2oPFEV2Qp9RTe5o8+pYUdl3CXZx5zIFJLd4EnJ8B/L0tmzcUqKYJ9tR/w1/6X 19CXPTDf38dlQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Vw0ST3qbtz4wyY; Thu, 6 Jun 2024 20:10:01 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 4/9] Remove pointless macro parameters in CALL_PROTO_HANDLER Date: Thu, 6 Jun 2024 20:09:44 +1000 Message-ID: <20240606100949.1250958-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606100949.1250958-1-david@gibson.dropbear.id.au> References: <20240606100949.1250958-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: KVPBALAMHS57MWHNBONRGCIZFOQJ35EI X-Message-ID-Hash: KVPBALAMHS57MWHNBONRGCIZFOQJ35EI X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The 'c' parameter is always passed exactly 'c'. The 'now' parameter is always passed exactly 'now'. Signed-off-by: David Gibson --- passt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/passt.c b/passt.c index a8c4cd3f..dabd86ed 100644 --- a/passt.c +++ b/passt.c @@ -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) { -#define CALL_PROTO_HANDLER(c, now, lc, uc) \ +#define CALL_PROTO_HANDLER(lc, uc) \ do { \ extern void \ lc ## _defer_handler (struct ctx *c) \ @@ -103,9 +103,9 @@ static void post_handler(struct ctx *c, const struct timespec *now) } while (0) /* 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 */ - CALL_PROTO_HANDLER(c, now, udp, UDP); + CALL_PROTO_HANDLER(udp, UDP); flow_defer_handler(c, now); #undef CALL_PROTO_HANDLER -- 2.45.2