tests: use terse notation in designated initializers where appropriate
* tests/btrfs.c (btrfs_test_dev_replace_ioctl): Initialize struct btrfs_ioctl_dev_replace_args using terse notation. * tests/clock_nanosleep.c (main): Initialize struct timespec using terse notation. * tests/nanosleep.c (main): Likewise.
This commit is contained in:
parent
469fd109cd
commit
f915f220c0
@ -1567,9 +1567,7 @@ btrfs_test_dev_replace_ioctl(void)
|
||||
{
|
||||
struct btrfs_ioctl_dev_replace_args args = {
|
||||
.cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START,
|
||||
.start = {
|
||||
.srcdevid = 1,
|
||||
},
|
||||
.start.srcdevid = 1
|
||||
};
|
||||
strcpy((char *)args.start.srcdev_name, "/dev/sda1");
|
||||
strcpy((char *)args.start.tgtdev_name, "/dev/sdb1");
|
||||
|
@ -47,7 +47,7 @@ main(void)
|
||||
struct timespec ts;
|
||||
uint32_t pad[2];
|
||||
} req = {
|
||||
.ts = { .tv_nsec = 0xc0de1 },
|
||||
.ts.tv_nsec = 0xc0de1,
|
||||
.pad = { 0xdeadbeef, 0xbadc0ded }
|
||||
}, rem = {
|
||||
.ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 },
|
||||
|
@ -45,7 +45,7 @@ main(void)
|
||||
struct timespec ts;
|
||||
uint32_t pad[2];
|
||||
} req = {
|
||||
.ts = { .tv_nsec = 0xc0de1 },
|
||||
.ts.tv_nsec = 0xc0de1,
|
||||
.pad = { 0xdeadbeef, 0xbadc0ded }
|
||||
}, rem = {
|
||||
.ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 },
|
||||
|
Loading…
x
Reference in New Issue
Block a user