diff options
author | 2025-04-22 17:55:41 +0200 | |
---|---|---|
committer | 2025-05-15 14:30:48 +0200 | |
commit | 05a6ec865d091fe8244657df8063f74e704d1711 (patch) | |
tree | 4522b724dbec7392ae63f10db8f2eb89dc156b7d /fs/btrfs/tests | |
parent | btrfs: remove unused btrfs_io_stripe::length (diff) | |
download | linux-rng-05a6ec865d091fe8244657df8063f74e704d1711.tar.xz linux-rng-05a6ec865d091fe8244657df8063f74e704d1711.zip |
btrfs: use unsigned types for constants defined as bit shifts
The unsigned type is a recommended practice (CWE-190, CWE-194) for bit
shifts to avoid problems with potential unwanted sign extensions.
Although there are no such cases in btrfs codebase, follow the
recommendation.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
-rw-r--r-- | fs/btrfs/tests/extent-io-tests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c index 6d1f8d62c5a0..00da54f0164c 100644 --- a/fs/btrfs/tests/extent-io-tests.c +++ b/fs/btrfs/tests/extent-io-tests.c @@ -14,9 +14,9 @@ #include "../disk-io.h" #include "../btrfs_inode.h" -#define PROCESS_UNLOCK (1 << 0) -#define PROCESS_RELEASE (1 << 1) -#define PROCESS_TEST_LOCKED (1 << 2) +#define PROCESS_UNLOCK (1U << 0) +#define PROCESS_RELEASE (1U << 1) +#define PROCESS_TEST_LOCKED (1U << 2) static noinline int process_page_range(struct inode *inode, u64 start, u64 end, unsigned long flags) |