mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 18:12:03 +02:00
ntfs: remove unnecessary ternary boolean conversion
Coccinelle warned about unnecessary patterns when assigning to bool variables. Simply assign the condition directly. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
cbe287fd65
commit
949ba99cfe
|
|
@ -1817,7 +1817,7 @@ struct runlist_element *ntfs_rl_punch_hole(struct runlist_element *dst_rl, int d
|
|||
!ntfs_rle_contain(s_rl, start_vcn))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
begin_split = s_rl->vcn != start_vcn ? true : false;
|
||||
begin_split = s_rl->vcn != start_vcn;
|
||||
|
||||
e_rl = ntfs_rl_find_vcn_nolock(dst_rl, end_vcn);
|
||||
if (!e_rl ||
|
||||
|
|
@ -1825,10 +1825,10 @@ struct runlist_element *ntfs_rl_punch_hole(struct runlist_element *dst_rl, int d
|
|||
!ntfs_rle_contain(e_rl, end_vcn))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
end_split = e_rl->vcn + e_rl->length - 1 != end_vcn ? true : false;
|
||||
end_split = e_rl->vcn + e_rl->length - 1 != end_vcn;
|
||||
|
||||
/* @s_rl has to be split into left, punched hole, and right */
|
||||
one_split_3 = e_rl == s_rl && begin_split && end_split ? true : false;
|
||||
one_split_3 = e_rl == s_rl && begin_split && end_split;
|
||||
|
||||
punch_cnt = (int)(e_rl - s_rl) + 1;
|
||||
|
||||
|
|
@ -1968,7 +1968,7 @@ struct runlist_element *ntfs_rl_collapse_range(struct runlist_element *dst_rl, i
|
|||
!ntfs_rle_contain(s_rl, start_vcn))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
begin_split = s_rl->vcn != start_vcn ? true : false;
|
||||
begin_split = s_rl->vcn != start_vcn;
|
||||
|
||||
e_rl = ntfs_rl_find_vcn_nolock(dst_rl, end_vcn);
|
||||
if (!e_rl ||
|
||||
|
|
@ -1976,10 +1976,10 @@ struct runlist_element *ntfs_rl_collapse_range(struct runlist_element *dst_rl, i
|
|||
!ntfs_rle_contain(e_rl, end_vcn))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
end_split = e_rl->vcn + e_rl->length - 1 != end_vcn ? true : false;
|
||||
end_split = e_rl->vcn + e_rl->length - 1 != end_vcn;
|
||||
|
||||
/* @s_rl has to be split into left, collapsed, and right */
|
||||
one_split_3 = e_rl == s_rl && begin_split && end_split ? true : false;
|
||||
one_split_3 = e_rl == s_rl && begin_split && end_split;
|
||||
|
||||
punch_cnt = (int)(e_rl - s_rl) + 1;
|
||||
*punch_rl = kvcalloc(punch_cnt + 1, sizeof(struct runlist_element),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user