From: Shuah Khan <skhan@linuxfoundation.org>
To: Kees Cook <keescook@chromium.org>, Shuah Khan <shuah@kernel.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/tls: Add {} to avoid static checker warning
Date: Fri, 4 Jun 2021 15:34:01 -0600 [thread overview]
Message-ID: <1c391e24-15d1-9be4-c32f-4677912359f9@linuxfoundation.org> (raw)
In-Reply-To: <20210527032718.3730773-1-keescook@chromium.org>
On 5/26/21 9:27 PM, Kees Cook wrote:
> 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>
> ---
> tools/testing/selftests/net/tls.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
> index 426d07875a48..7119f8eb823b 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);
> }
>
Will pick this up for 5.14
thanks,
-- Shuah
next prev parent reply other threads:[~2021-06-04 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 3:27 Kees Cook
2021-06-04 21:34 ` Shuah Khan [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-08 21:41 Kees Cook
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=1c391e24-15d1-9be4-c32f-4677912359f9@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=dan.carpenter@oracle.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.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
all inboxes | Powered by JetHome®