qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/8] migration: Add spaces around operator


From: Markus Armbruster
Subject: Re: [PATCH v2 3/8] migration: Add spaces around operator
Date: Mon, 19 Oct 2020 10:24:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

"Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:

> * Bihong Yu (yubihong@huawei.com) wrote:
>> Signed-off-by: Bihong Yu <yubihong@huawei.com>
>> Reviewed-by: Chuan Zheng <zhengchuan@huawei.com>
>
> Yes that's OK, I'm a bit sturprised we need the space afte rthe * in the
> VMStateDescription case, I wouldn't necessarily go and change them all.

We don't: it's not the binary multiplication operator *, where we want a
space on both sides, it's a pointer declarator, where we want a space on
the left only.

Example:

    int *pa, *pb, *pc;
    *pa = *pb * *pc;

Note the space on both side of binary operator * (multiplication), but
only on the left side of the pointer declarator's * and the unary
operator * (indirection).

> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
[...]
>> diff --git a/migration/savevm.c b/migration/savevm.c
>> index d2e141f..9e95df1 100644
>> --- a/migration/savevm.c
>> +++ b/migration/savevm.c
>> @@ -521,7 +521,7 @@ static const VMStateDescription vmstate_configuration = {
>>          VMSTATE_VBUFFER_ALLOC_UINT32(name, SaveState, 0, NULL, len),
>>          VMSTATE_END_OF_LIST()
>>      },
>> -    .subsections = (const VMStateDescription*[]) {
>> +    .subsections = (const VMStateDescription * []) {
>>          &vmstate_target_page_bits,
>>          &vmstate_capabilites,
>>          &vmstate_uuid,

Should be

   .subsections = (const VMStateDescription *[]) {

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]