diff options
author | Kees Cook <keescook@chromium.org> | 2021-05-26 20:27:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 21:44:56 +0200 |
commit | 97ac63b13904e0f7c18d4a8eee7efd4c50832d70 (patch) | |
tree | e739404fca22773c08af1208083fd06ea48c3ff2 /tools/testing/selftests/net | |
parent | a477402de0e320363699f307810cb315986c4a81 (diff) | |
download | linux-stable-97ac63b13904e0f7c18d4a8eee7efd4c50832d70.tar.gz linux-stable-97ac63b13904e0f7c18d4a8eee7efd4c50832d70.tar.bz2 linux-stable-97ac63b13904e0f7c18d4a8eee7efd4c50832d70.zip |
selftests/tls: Add {} to avoid static checker warning
[ Upstream commit f50688b47c5858d2ff315d020332bf4cb6710837 ]
This silences a static checker warning due to the unusual macro
construction of EXPECT_*() by adding explicit {}s around the enclosing
while loop.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Stable-dep-of: c326ca98446e ("selftests: tls: swap the TX and RX sockets in some tests")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net')
-rw-r--r-- | tools/testing/selftests/net/tls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 7549d39ccaff..43bb9eadf03e 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -202,8 +202,9 @@ TEST_F(tls, sendmsg_large) EXPECT_EQ(sendmsg(self->cfd, &msg, 0), send_len); } - while (recvs++ < sends) + while (recvs++ < sends) { EXPECT_NE(recv(self->fd, mem, send_len, 0), -1); + } free(mem); } |