selftests/net: fix warnings on reuseaddr_ports_exhausted

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: 7f204a7de8 ("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>
This commit is contained in:
Carlos Llamas 2021-03-16 01:04:29 +00:00 committed by David S. Miller
parent 13832ae275
commit 81f711d67a

View File

@ -30,25 +30,25 @@ struct reuse_opts {
}; };
struct reuse_opts unreusable_opts[12] = { struct reuse_opts unreusable_opts[12] = {
{0, 0, 0, 0}, {{0, 0}, {0, 0}},
{0, 0, 0, 1}, {{0, 0}, {0, 1}},
{0, 0, 1, 0}, {{0, 0}, {1, 0}},
{0, 0, 1, 1}, {{0, 0}, {1, 1}},
{0, 1, 0, 0}, {{0, 1}, {0, 0}},
{0, 1, 0, 1}, {{0, 1}, {0, 1}},
{0, 1, 1, 0}, {{0, 1}, {1, 0}},
{0, 1, 1, 1}, {{0, 1}, {1, 1}},
{1, 0, 0, 0}, {{1, 0}, {0, 0}},
{1, 0, 0, 1}, {{1, 0}, {0, 1}},
{1, 0, 1, 0}, {{1, 0}, {1, 0}},
{1, 0, 1, 1}, {{1, 0}, {1, 1}},
}; };
struct reuse_opts reusable_opts[4] = { struct reuse_opts reusable_opts[4] = {
{1, 1, 0, 0}, {{1, 1}, {0, 0}},
{1, 1, 0, 1}, {{1, 1}, {0, 1}},
{1, 1, 1, 0}, {{1, 1}, {1, 0}},
{1, 1, 1, 1}, {{1, 1}, {1, 1}},
}; };
int bind_port(struct __test_metadata *_metadata, int reuseaddr, int reuseport) int bind_port(struct __test_metadata *_metadata, int reuseaddr, int reuseport)