tree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v)

This commit is contained in:
Mike Yuan
2024-12-28 15:08:00 +01:00
parent 382f3438d9
commit 1e4e557262
23 changed files with 77 additions and 60 deletions
+3 -2
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include "alloc-util.h"
#include "bitfield.h"
#include "capability-util.h"
#include "cap-list.h"
#include "extract-word.h"
@@ -83,7 +84,7 @@ int capability_set_to_string(uint64_t set, char **ret) {
for (unsigned i = 0; i <= cap_last_cap(); i++) {
const char *p;
if (!FLAGS_SET(set, UINT64_C(1) << i))
if (!BIT_SET(set, i))
continue;
p = CAPABILITY_TO_STRING(i);
@@ -143,7 +144,7 @@ int capability_set_to_strv(uint64_t set, char ***ret) {
for (unsigned i = 0; i <= cap_last_cap(); i++) {
const char *p;
if (!FLAGS_SET(set, UINT64_C(1) << i))
if (!BIT_SET(set, i))
continue;
p = CAPABILITY_TO_STRING(i);