tree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitfield.h"
|
||||
#include "compress.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
@@ -124,7 +125,10 @@ bool compression_supported(Compression c) {
|
||||
(1U << COMPRESSION_LZ4) * HAVE_LZ4 |
|
||||
(1U << COMPRESSION_ZSTD) * HAVE_ZSTD;
|
||||
|
||||
return c >= 0 && c < _COMPRESSION_MAX && FLAGS_SET(supported, 1U << c);
|
||||
assert(c >= 0);
|
||||
assert(c < _COMPRESSION_MAX);
|
||||
|
||||
return BIT_SET(supported, c);
|
||||
}
|
||||
|
||||
#if HAVE_XZ
|
||||
|
||||
Reference in New Issue
Block a user