mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
util: add util_set_bit
Sets a single bit in a uint8_t * bit field
This commit is contained in:
parent
dd2daa4961
commit
76b73a1cf5
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user