From: Mathieu Desnoyers Date: Thu, 26 Nov 2020 20:29:28 +0000 (-0500) Subject: Fix: counter: cast UINT*_MAX to 64-bit signed type before negative X-Git-Tag: v2.13.0-rc1~79 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=f801323dd7650782241e276d5a2971fc37312fa8;hp=f801323dd7650782241e276d5a2971fc37312fa8;p=lttng-modules.git Fix: counter: cast UINT*_MAX to 64-bit signed type before negative (long long)-UINT32_MAX leads to value 1 which is not what we expect. This is due to implicit type promotion from unsigned to signed 32-bit integer. Apply this to 8-bit and 16-bit types as well even though they are not affected by this issue to keep things regular. Signed-off-by: Mathieu Desnoyers ---