From: Avinesh Kumar via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] setsockopt08: make check fixes
Date: Fri, 28 Aug 2026 12:01:03 +0200 [thread overview]
Message-ID: <20260828100105.195974-1-avinesh.kumar@suse.com> (raw)
From: Avinesh Kumar <avinesh.kumar@suse.com>
- correct misspelled 'layed'
- remove space after a cast
- make setup() and run() static
Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
---
testcases/kernel/syscalls/setsockopt/setsockopt08.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt08.c b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
index 3d1838f6ed73..c0be2f02489d 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt08.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
@@ -68,7 +68,7 @@
*
* That is, the padding gets inserted unconditionally during the transformation,
* independent of the actual values of ->u.user.match_size or
- * ->u.user.target_size and the result ends up getting layed out with proper
+ * ->u.user.target_size and the result ends up getting laid out with proper
* alignment only if said values match the expectations.
*
* That's not a problem in itself, but this unconditional insertion of padding
@@ -99,7 +99,7 @@
static void *buffer;
-void setup(void)
+static void setup(void)
{
if (!tst_is_compat_mode())
tst_res(TINFO, "The vulnerability was only present in 32-bit compat mode");
@@ -107,7 +107,7 @@ void setup(void)
tst_setup_netns();
}
-void run(void)
+static void run(void)
{
const char *const res_fmt_str =
"setsockopt(%d, IPPROTO_IP, IPT_SO_SET_REPLACE, %p, 1)";
@@ -118,7 +118,7 @@ void run(void)
const size_t tgt_size = 32;
const size_t match_size = 1024 - 64 - 112 - 4 - tgt_size - 4;
struct xt_entry_target *xt_entry_tgt =
- ((struct xt_entry_target *) (&ipt_entry->elems[0] + match_size));
+ ((struct xt_entry_target *)(&ipt_entry->elems[0] + match_size));
int fd = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0);
int result;
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-08-28 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 10:01 Avinesh Kumar via ltp [this message]
2026-08-28 11:15 ` [LTP] [PATCH] setsockopt08: make check fixes Andrea Cervesato via ltp
2026-08-28 11:16 ` Andrea Cervesato via ltp
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=20260828100105.195974-1-avinesh.kumar@suse.com \
--to=ltp@lists.linux.it \
--cc=avinesh.kumar@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.