mirror of
https://github.com/opnsense/src.git
synced 2026-05-19 08:25:22 -04:00
linuxkpi xarray: Correct expression in assertion.
Reported by: GCC -Wparantheses
Reviewed by: wulf, hselasky
Differential Revision: https://reviews.freebsd.org/D34197
(cherry picked from commit b0c1600a8c)
This commit is contained in:
parent
ffefb63627
commit
f70fe58d0a
1 changed files with 2 additions and 2 deletions
|
|
@ -103,7 +103,7 @@ __xa_alloc(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, gfp_t
|
|||
XA_ASSERT_LOCKED(xa);
|
||||
|
||||
/* mask should allow to allocate at least one item */
|
||||
MPASS(mask > (xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0);
|
||||
MPASS(mask > ((xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0));
|
||||
|
||||
/* mask can be any power of two value minus one */
|
||||
MPASS((mask & (mask + 1)) == 0);
|
||||
|
|
@ -160,7 +160,7 @@ __xa_alloc_cyclic(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask,
|
|||
XA_ASSERT_LOCKED(xa);
|
||||
|
||||
/* mask should allow to allocate at least one item */
|
||||
MPASS(mask > (xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0);
|
||||
MPASS(mask > ((xa->flags & XA_FLAGS_ALLOC1) != 0 ? 1 : 0));
|
||||
|
||||
/* mask can be any power of two value minus one */
|
||||
MPASS((mask & (mask + 1)) == 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue