Skip to content

Commit aeff815

Browse files
Carlos Llamasgregkh
authored andcommitted
selftests/net: fix warnings on reuseaddr_ports_exhausted
[ Upstream commit 81f711d ] Fix multiple warnings seen with gcc 10.2.1: reuseaddr_ports_exhausted.c:32:41: warning: missing braces around initializer [-Wmissing-braces] 32 | struct reuse_opts unreusable_opts[12] = { | ^ 33 | {0, 0, 0, 0}, | { } { } Fixes: 7f204a7 ("selftests: net: Add SO_REUSEADDR test to check if 4-tuples are fully utilized.") Signed-off-by: Carlos Llamas <cmllamas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent bd63bd7 commit aeff815

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎tools/testing/selftests/net/reuseaddr_ports_exhausted.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ struct reuse_opts {
3030
};
3131

3232
struct reuse_opts unreusable_opts[12] = {
33-
{0, 0, 0, 0},
34-
{0, 0, 0, 1},
35-
{0, 0, 1, 0},
36-
{0, 0, 1, 1},
37-
{0, 1, 0, 0},
38-
{0, 1, 0, 1},
39-
{0, 1, 1, 0},
40-
{0, 1, 1, 1},
41-
{1, 0, 0, 0},
42-
{1, 0, 0, 1},
43-
{1, 0, 1, 0},
44-
{1, 0, 1, 1},
33+
{{0, 0}, {0, 0}},
34+
{{0, 0}, {0, 1}},
35+
{{0, 0}, {1, 0}},
36+
{{0, 0}, {1, 1}},
37+
{{0, 1}, {0, 0}},
38+
{{0, 1}, {0, 1}},
39+
{{0, 1}, {1, 0}},
40+
{{0, 1}, {1, 1}},
41+
{{1, 0}, {0, 0}},
42+
{{1, 0}, {0, 1}},
43+
{{1, 0}, {1, 0}},
44+
{{1, 0}, {1, 1}},
4545
};
4646

4747
struct reuse_opts reusable_opts[4] = {
48-
{1, 1, 0, 0},
49-
{1, 1, 0, 1},
50-
{1, 1, 1, 0},
51-
{1, 1, 1, 1},
48+
{{1, 1}, {0, 0}},
49+
{{1, 1}, {0, 1}},
50+
{{1, 1}, {1, 0}},
51+
{{1, 1}, {1, 1}},
5252
};
5353

5454
int bind_port(struct __test_metadata *_metadata, int reuseaddr, int reuseport)

0 commit comments

Comments
 (0)