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
+5 -1
View File
@@ -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