]> git.ipfire.org Git - thirdparty/systemd.git/commit
macro: relax CONST_MAX() type check a tiny bit
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Jul 2021 16:39:09 +0000 (18:39 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Jul 2021 13:56:56 +0000 (15:56 +0200)
commitaddae96a1a1f010b5db12cbf8b78719658fcc23b
treed1846e5f2290c720db518c1307b0502d9e6b94fc
parenta4d9c121cc011d3a4feeaa74f54a69de8c9b0b20
macro: relax CONST_MAX() type check a tiny bit

This checked for strict type compatibility so far, which mean CONST_MAX()
couldn't be used on two differently signed integers, even though
conceptually there's nothing wrong with allowing that here, as C
correctly picks the larger type in the ternary op.

hence, let's explicitly whitelist integer comparisons here, as long as
the signedness matches.
src/fundamental/macro-fundamental.h