From: Dave Seddon <dave.seddon.ca@gmail.com>
To: netdev@vger.kernel.org
Cc: Dave Seddon <dave.seddon.ca@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@kernel.org>
Subject: [PATCH iproute2 v2 2/2] ip xfrm: drop the cast of RTA_DATA() in deleteall
Date: Fri, 27 Nov 2026 22:40:08 -0800 [thread overview]
Message-ID: <20261128064008.2028008-3-dave.seddon.ca@gmail.com> (raw)
In-Reply-To: <20261128064008.2028008-1-dave.seddon.ca@gmail.com>
Remove the (void *) cast on RTA_DATA() in the two deleteall callers.
RTA_DATA() already yields a void pointer. No functional change.
Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
---
ip/xfrm_policy.c | 2 +-
ip/xfrm_state.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index 1a41f2a9..a673cbb2 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -783,7 +783,7 @@ static int xfrm_policy_keep(struct nlmsghdr *n, void *arg)
if (tb[XFRMA_MARK]) {
int r = addattr_l(new_n, xb->size, XFRMA_MARK,
- (void *)RTA_DATA(tb[XFRMA_MARK]), RTA_PAYLOAD(tb[XFRMA_MARK]));
+ RTA_DATA(tb[XFRMA_MARK]), RTA_PAYLOAD(tb[XFRMA_MARK]));
if (r < 0) {
fprintf(stderr, "%s: XFRMA_MARK failed\n", __func__);
exit(1);
diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index 7e365b19..a2e0ed08 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -1203,7 +1203,7 @@ static int xfrm_state_keep(struct nlmsghdr *n, void *arg)
if (tb[XFRMA_MARK]) {
int r = addattr_l(new_n, xb->size, XFRMA_MARK,
- (void *)RTA_DATA(tb[XFRMA_MARK]), RTA_PAYLOAD(tb[XFRMA_MARK]));
+ RTA_DATA(tb[XFRMA_MARK]), RTA_PAYLOAD(tb[XFRMA_MARK]));
if (r < 0) {
fprintf(stderr, "%s: XFRMA_MARK failed\n", __func__);
exit(1);
--
2.56.0
prev parent reply other threads:[~2026-11-28 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 6:40 [PATCH iproute2 v2 0/2] ip xfrm: deleteall mark payload, and drop the cast Dave Seddon
2026-11-28 6:40 ` [PATCH iproute2 v2 1/2] ip xfrm: copy only the mark payload in deleteall Dave Seddon
2026-11-28 6:40 ` Dave Seddon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261128064008.2028008-3-dave.seddon.ca@gmail.com \
--to=dave.seddon.ca@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox