Commit bce86231 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Alexei Starovoitov

selftests/bpf: Simplify the calculation of variables

Fix the following coccicheck warnings:

./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A
&& B is equivalent to !A || B.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/1614757930-17197-1-git-send-email-jiapeng.chong@linux.alibaba.com
parent 46ac034f
...@@ -732,7 +732,7 @@ static int sendmsg_test(struct sockmap_options *opt) ...@@ -732,7 +732,7 @@ static int sendmsg_test(struct sockmap_options *opt)
* socket is not a valid test. So in this case lets not * socket is not a valid test. So in this case lets not
* enable kTLS but still run the test. * enable kTLS but still run the test.
*/ */
if (!txmsg_redir || (txmsg_redir && txmsg_ingress)) { if (!txmsg_redir || txmsg_ingress) {
err = sockmap_init_ktls(opt->verbose, rx_fd); err = sockmap_init_ktls(opt->verbose, rx_fd);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment