Commit graph

2 commits

Author SHA1 Message Date
Peter Hutterer
d95c1d30f8 util: add some mask helpers 2023-03-03 11:16:48 +10:00
Peter Hutterer
7c08308129 util: only do flag_* operations if the bit fits
This silently ignores any bit higher than the target storage (e.g.
flag_set(some_uint32, 33)) but that's still better than silently writing
into random memory.

Add a c file for util-bits.h as well - only contains the tests but at
least that way those are picked up like all other util tests.
2022-07-29 15:43:48 +10:00