diff --git a/libbtrfsutil/btrfs.h b/libbtrfsutil/btrfs.h index d2e49c59..86f5b4e9 100644 --- a/libbtrfsutil/btrfs.h +++ b/libbtrfsutil/btrfs.h @@ -242,12 +242,12 @@ struct btrfs_ioctl_dev_info_args { */ /* Request information about checksum type and size */ -#define BTRFS_FS_INFO_FLAG_CSUM_INFO (1 << 0) +#define BTRFS_FS_INFO_FLAG_CSUM_INFO (1U << 0) /* Request information about filesystem generation */ -#define BTRFS_FS_INFO_FLAG_GENERATION (1 << 1) +#define BTRFS_FS_INFO_FLAG_GENERATION (1U << 1) /* Request information about filesystem metadata UUID */ -#define BTRFS_FS_INFO_FLAG_METADATA_UUID (1 << 2) +#define BTRFS_FS_INFO_FLAG_METADATA_UUID (1U << 2) struct btrfs_ioctl_fs_info_args { __u64 max_id; /* out */ diff --git a/libbtrfsutil/btrfsutil.h b/libbtrfsutil/btrfsutil.h index 212ffa31..0f53a552 100644 --- a/libbtrfsutil/btrfsutil.h +++ b/libbtrfsutil/btrfsutil.h @@ -545,12 +545,12 @@ LIBBTRFSUTIL_ALIAS(btrfs_util_create_subvolume_fd); * %BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY. It requires appropriate privilege * (CAP_SYS_ADMIN). */ -#define BTRFS_UTIL_CREATE_SNAPSHOT_RECURSIVE (1 << 0) +#define BTRFS_UTIL_CREATE_SNAPSHOT_RECURSIVE (1U << 0) /** * BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY - Create a read-only snapshot. */ -#define BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY (1 << 1) -#define BTRFS_UTIL_CREATE_SNAPSHOT_MASK ((1 << 2) - 1) +#define BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY (1U << 1) +#define BTRFS_UTIL_CREATE_SNAPSHOT_MASK ((1U << 2) - 1) /** * btrfs_util_create_snapshot() - Alias of btrfs_util_snapshot_snapshot(), do not use in new code. @@ -629,8 +629,8 @@ LIBBTRFSUTIL_ALIAS(btrfs_util_create_snapshot_fd2); * error. Note that this is currently implemented in userspace non-atomically. * It requires appropriate privilege (CAP_SYS_ADMIN). */ -#define BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE (1 << 0) -#define BTRFS_UTIL_DELETE_SUBVOLUME_MASK ((1 << 1) - 1) +#define BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE (1U << 0) +#define BTRFS_UTIL_DELETE_SUBVOLUME_MASK ((1U << 1) - 1) /** * btrfs_util_delete_subvolume() - Alias of btrfs_util_subvolume_delete(), do not use in new code. @@ -698,8 +698,8 @@ struct btrfs_util_subvolume_iterator; * behavior is pre-order, e.g., foo will be yielded before foo/bar. If this flag * is specified, foo/bar will be yielded before foo. */ -#define BTRFS_UTIL_SUBVOLUME_ITERATOR_POST_ORDER (1 << 0) -#define BTRFS_UTIL_SUBVOLUME_ITERATOR_MASK ((1 << 1) - 1) +#define BTRFS_UTIL_SUBVOLUME_ITERATOR_POST_ORDER (1U << 0) +#define BTRFS_UTIL_SUBVOLUME_ITERATOR_MASK ((1U << 1) - 1) /** * btrfs_util_create_subvolume_iterator() - Alias of btrfs_util_subvolume_iter_create(), do not use in new code. diff --git a/libbtrfsutil/subvolume.c b/libbtrfsutil/subvolume.c index 6cd4e74c..5a836e65 100644 --- a/libbtrfsutil/subvolume.c +++ b/libbtrfsutil/subvolume.c @@ -784,7 +784,7 @@ PUBLIC enum btrfs_util_error btrfs_util_subvolume_create_fd(int parent_fd, struct btrfs_util_qgroup_inherit *qgroup_inherit) LIBBTRFSUTIL_ALIAS(btrfs_util_create_subvolume_fd); -#define BTRFS_UTIL_SUBVOLUME_ITERATOR_CLOSE_FD (1 << 30) +#define BTRFS_UTIL_SUBVOLUME_ITERATOR_CLOSE_FD (1U << 30) struct search_stack_entry { union {