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

Re: [Xen-devel] [PATCH 4/7] x86emul: fold SrcImmByte fetching



On 11/08/16 15:09, Jan Beulich wrote:
>>>> On 11.08.16 at 15:41, <andrew.cooper3@xxxxxxxxxx> wrote:
>> On 11/08/16 13:05, Jan Beulich wrote:
>>> There's no need for having identical code spelled out twice.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>
>>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>>> @@ -1979,9 +1979,12 @@ x86_emulate(
>>>              goto done;
>>>          break;
>>>      case SrcImm:
>>> +        if ( !(d & ByteOp) )
>>> +            src.bytes = op_bytes != 8 ? op_bytes : 4;
>>> +        else
>> {
>>
>>> +    case SrcImmByte:
>>> +            src.bytes = 1;
>> }
> I don't understand: This is a single statement, which we don't require
> to be surrounded by braces.

Yes it is syntactically correct, but it is very deceptive as the case
statement obscures the nature of the else scope.

~Andrew

_______________________________________________
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®.