* [LTP] [PATCH] syscalls/bind: Use safe_macros to check the return value of the close() & bind().
@ 2021-03-24 9:20 Xie Ziyao
2021-04-01 7:06 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Xie Ziyao @ 2021-03-24 9:20 UTC (permalink / raw
To: ltp
For those:
testcases/kernel/syscalls/bind/bind03.c
testcases/kernel/syscalls/bind/bind06.c
Signed-off-by: Xie Ziyao <xieziyao@huawei.com>
---
testcases/kernel/syscalls/bind/bind03.c | 4 ++--
testcases/kernel/syscalls/bind/bind06.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/bind/bind03.c b/testcases/kernel/syscalls/bind/bind03.c
index c39e8f197..ebde19591 100644
--- a/testcases/kernel/syscalls/bind/bind03.c
+++ b/testcases/kernel/syscalls/bind/bind03.c
@@ -66,8 +66,8 @@ void run(void)
static void cleanup(void)
{
- close(sock1);
- close(sock2);
+ SAFE_CLOSE(sock1);
+ SAFE_CLOSE(sock2);
}
static struct tst_test test = {
diff --git a/testcases/kernel/syscalls/bind/bind06.c b/testcases/kernel/syscalls/bind/bind06.c
index e971a8940..017e0fc89 100644
--- a/testcases/kernel/syscalls/bind/bind06.c
+++ b/testcases/kernel/syscalls/bind/bind06.c
@@ -60,8 +60,8 @@ static void cleanup(void)
static void do_bind(void)
{
- bind(fd, (struct sockaddr *)&addr1, sizeof(addr1));
- bind(fd, (struct sockaddr *)&addr2, sizeof(addr2));
+ SAFE_BIND(fd, (struct sockaddr *)&addr1, sizeof(addr1));
+ SAFE_BIND(fd, (struct sockaddr *)&addr2, sizeof(addr2));
}
static void *thread_run(void *arg)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] syscalls/bind: Use safe_macros to check the return value of the close() & bind().
2021-03-24 9:20 [LTP] [PATCH] syscalls/bind: Use safe_macros to check the return value of the close() & bind() Xie Ziyao
@ 2021-04-01 7:06 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2021-04-01 7:06 UTC (permalink / raw
To: ltp
Hi Ziyao,
Thanks merged!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-01 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-24 9:20 [LTP] [PATCH] syscalls/bind: Use safe_macros to check the return value of the close() & bind() Xie Ziyao
2021-04-01 7:06 ` Petr Vorel
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.