[dpdk-dev] [PATCH] eal, power: don't use '-' sign with unsigned literals
Burakov, Anatoly
anatoly.burakov at intel.com
Fri Mar 12 13:51:46 CET 2021
On 09-Mar-21 11:44 PM, Tyler Retzlaff wrote:
> use ~0ULL instead of -1ULL to avoid contridctory application of '-' sign
> to integer literal where the desired type is unsigned.
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
Not sure i agree. It's a very common pattern and is widely used and
understood. I mean, if anything, seeing `~0` would have me stop and
think as i've literally never seen such code before.
--
Thanks,
Anatoly
More information about the dev
mailing list