tree-wide: drop !! casts to booleans
They are not needed, because anything that is non-zero is converted to true. C11: > 6.3.1.2: When any scalar value is converted to _Bool, the result is 0 if the > value compares equal to 0; otherwise, the result is 1. https://stackoverflow.com/questions/31551888/casting-int-to-bool-in-c-c
This commit is contained in:
@@ -500,7 +500,7 @@ int btrfs_subvol_get_info_fd(int fd, uint64_t subvol_id, BtrfsSubvolInfo *ret) {
|
||||
(usec_t) le32toh(ri->otime.nsec) / NSEC_PER_USEC;
|
||||
|
||||
ret->subvol_id = subvol_id;
|
||||
ret->read_only = !!(le64toh(ri->flags) & BTRFS_ROOT_SUBVOL_RDONLY);
|
||||
ret->read_only = le64toh(ri->flags) & BTRFS_ROOT_SUBVOL_RDONLY;
|
||||
|
||||
assert_cc(sizeof(ri->uuid) == sizeof(ret->uuid));
|
||||
memcpy(&ret->uuid, ri->uuid, sizeof(ret->uuid));
|
||||
|
||||
Reference in New Issue
Block a user