mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
clean-up: Remove redundant faulty logic
Remove conditional that boils down to "if yes or no, then do". The previous condition in the statement is sufficient and the extra (always true) condition is unnecessary.
This commit is contained in:
parent
4c0db84948
commit
772fa460d1
@ -772,11 +772,8 @@ static int lvchange_writemostly(struct logical_volume *lv)
|
||||
if (!(pv_names[i] = dm_pool_zalloc(lv->vg->vgmem, tmp_str_len + 3)))
|
||||
return_0;
|
||||
|
||||
if (tmp_str_len < 3 ||
|
||||
((tmp_str[tmp_str_len - 2] != ':') &&
|
||||
((tmp_str[tmp_str_len - 1] != 't') ||
|
||||
(tmp_str[tmp_str_len - 1] != 'y') ||
|
||||
(tmp_str[tmp_str_len - 1] != 'n'))))
|
||||
if ((tmp_str_len < 3) ||
|
||||
(tmp_str[tmp_str_len - 2] != ':'))
|
||||
/* Default to 'y' if no mode specified */
|
||||
sprintf(pv_names[i], "%s:y", tmp_str);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user