From: Kees Cook Date: Thu, 27 May 2021 03:27:19 +0000 (-0700) Subject: selftests/tls: Add {} to avoid static checker warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f50688b47c5858d2ff315d020332bf4cb6710837;p=linux.git selftests/tls: Add {} to avoid static checker warning 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 Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets") Signed-off-by: Kees Cook Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index 426d07875a48e..7119f8eb823b9 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -418,8 +418,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); }