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:
Дмитрий Левин 2016-07-28 17:07:23 +00:00
parent 469fd109cd
commit f915f220c0
3 changed files with 3 additions and 5 deletions

View File

@ -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");

View File

@ -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 },

View File

@ -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 },