[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH XTF 4/4] build: Avoid using initialisers for anonymous unions



>>> On 28.09.17 at 12:59, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/tests/livepatch-priv-check/main.c
> +++ b/tests/livepatch-priv-check/main.c
> @@ -38,23 +38,17 @@ static void check_ret(const char *test, int rc)
>  static void test_upload(void)
>  {
>      static uint8_t payload[PAGE_SIZE];
> -    xen_sysctl_t op =
> -    {
> +    xen_sysctl_t op = {
>          .cmd = XEN_SYSCTL_livepatch_op,
>          .interface_version = sysctl_interface_version,
> -        .u.livepatch = {
> -            .cmd = XEN_SYSCTL_LIVEPATCH_UPLOAD,
> -            .u.upload = {
> -                .name = {
> -                    .name.p = TEST_NAME,
> -                    .size = sizeof(TEST_NAME),
> -                },
> -                .size = PAGE_SIZE,
> -                .payload.p = payload,
> -            },
> -        },
>      };
>  
> +    op.u.livepatch.cmd = XEN_SYSCTL_LIVEPATCH_UPLOAD;
> +    op.u.livepatch.u.upload.name.name.p = TEST_NAME;
> +    op.u.livepatch.u.upload.name.size = sizeof(TEST_NAME);
> +    op.u.livepatch.u.upload.size = PAGE_SIZE;
> +    op.u.livepatch.u.upload.payload.p = payload;

So where's the anonymous field here? Same for the other changes
further down.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.