diff options
author | David Sterba <dsterba@suse.com> | 2025-04-23 18:53:57 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:49 +0200 |
commit | f963e0128b180e8ab501bf1d5772fce17c36d68f (patch) | |
tree | 31cedb1df93b43743ac2e27ddd1cd5d13900128e /fs/btrfs/ioctl.c | |
parent | 73d6bcf41bd2e9906060bcc8b182cdb9775e61f9 (diff) |
btrfs: trivial conversion to return bool instead of int
Old code has a lot of int for bool return values, bool is recommended
and done in new code. Convert the trivial cases that do simple 0/false
and 1/true. Functions comment are updated if needed.
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3341344a9fd2..a498fe524c90 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1446,8 +1446,8 @@ out: return ret; } -static noinline int key_in_sk(const struct btrfs_key *key, - const struct btrfs_ioctl_search_key *sk) +static noinline bool key_in_sk(const struct btrfs_key *key, + const struct btrfs_ioctl_search_key *sk) { struct btrfs_key test; int ret; @@ -1458,7 +1458,7 @@ static noinline int key_in_sk(const struct btrfs_key *key, ret = btrfs_comp_cpu_keys(key, &test); if (ret < 0) - return 0; + return false; test.objectid = sk->max_objectid; test.type = sk->max_type; @@ -1466,8 +1466,8 @@ static noinline int key_in_sk(const struct btrfs_key *key, ret = btrfs_comp_cpu_keys(key, &test); if (ret > 0) - return 0; - return 1; + return false; + return true; } static noinline int copy_to_sk(struct btrfs_path *path, |