3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-26 09:32:34 +01:00

util: add util_set_bit

Sets a single bit in a uint8_t * bit field
This commit is contained in:
James Prestwood 2019-08-21 15:21:43 -07:00 committed by Denis Kenzior
parent dd2daa4961
commit 76b73a1cf5

View File

@ -65,4 +65,9 @@ static inline bool util_mem_is_zero(const uint8_t *field, size_t size)
return true;
}
static inline void util_set_bit(uint8_t *field, unsigned int bit)
{
field[bit / 8] = 1 << (bit % 8);
}
#endif /* __UTIL_H */