[PATCH] eal: silence -Wconstant-logical-operand in RTE_IS_POWER_OF_2
Stephen Hemminger
stephen at networkplumber.org
Mon May 18 19:10:22 CEST 2026
On Mon, 18 May 2026 17:56:08 +0100
Bruce Richardson <bruce.richardson at intel.com> wrote:
> I'd also suggest changing the second part of the && to match, changing the
> "!" for explicit "== 0":
>
> #define RTE_IS_POWER_OF_2(n) ((n) != 0 && (((n) - 1) & (n)) == 0)
Was heading for the smallest possible part
More information about the stable
mailing list