|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/x86: Use min macro instead of ternary operator
Hi, On 29/03/2020 08:22, Simran Singhal wrote: Replace ternary operator with macro min as it is shorter and thus increases code readability. Macro min return the minimum of the two compared values. While I understand the ternary operator is doing exactly the same as a min(), I read the current code as "If there is an error then return the error code, otherwise return 0". This is quite different from the meaning of "min" which is "I want the minimum of the two values". Therefore I am not convinced using min() is the right thing to do.
-- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |