selftests/net: update initializer syntax to use c99 designators

Before, clang version 9 threw errors such as: error:
use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                { tstamp: true, swtstamp: true }
                  ^~~~~~~
                  .tstamp =
Fix these warnings in tools/testing/selftests/net in the same manner as
commit 121e357ac7 ("selftests/harness: Update named initializer syntax").
N.B. rxtimestamp.c is the only affected file in the directory.

Signed-off-by: Tanner Love <tannerlove@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tanner Love 2020-07-04 16:45:14 -04:00 committed by David S. Miller
parent 565f499c6f
commit f551e2fdaf
1 changed files with 15 additions and 15 deletions

View File

@ -68,44 +68,44 @@ static struct socket_type socket_types[] = {
static struct test_case test_cases[] = {
{ {}, {} },
{
{ so_timestamp: 1 },
{ tstamp: true }
{ .so_timestamp = 1 },
{ .tstamp = true }
},
{
{ so_timestampns: 1 },
{ tstampns: true }
{ .so_timestampns = 1 },
{ .tstampns = true }
},
{
{ so_timestamp: 1, so_timestampns: 1 },
{ tstampns: true }
{ .so_timestamp = 1, .so_timestampns = 1 },
{ .tstampns = true }
},
{
{ so_timestamping: SOF_TIMESTAMPING_RX_SOFTWARE },
{ .so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE },
{}
},
{
/* Loopback device does not support hw timestamps. */
{ so_timestamping: SOF_TIMESTAMPING_RX_HARDWARE },
{ .so_timestamping = SOF_TIMESTAMPING_RX_HARDWARE },
{}
},
{
{ so_timestamping: SOF_TIMESTAMPING_SOFTWARE },
warn_on_fail : true
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE },
.warn_on_fail = true
},
{
{ so_timestamping: SOF_TIMESTAMPING_RX_SOFTWARE
{ .so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE
| SOF_TIMESTAMPING_RX_HARDWARE },
{}
},
{
{ so_timestamping: SOF_TIMESTAMPING_SOFTWARE
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
| SOF_TIMESTAMPING_RX_SOFTWARE },
{ swtstamp: true }
{ .swtstamp = true }
},
{
{ so_timestamp: 1, so_timestamping: SOF_TIMESTAMPING_SOFTWARE
{ .so_timestamp = 1, .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
| SOF_TIMESTAMPING_RX_SOFTWARE },
{ tstamp: true, swtstamp: true }
{ .tstamp = true, .swtstamp = true }
},
};