mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Remove double braces
Clang gives notice about possible confusion as commonly double bracces are used when some assignment is done inside them.
This commit is contained in:
parent
2d1175a895
commit
f77736cab5
@ -126,7 +126,7 @@ static int _get_block_size(struct device *dev, unsigned int *size)
|
||||
{
|
||||
const char *name = dev_name(dev);
|
||||
|
||||
if ((dev->block_size == -1)) {
|
||||
if (dev->block_size == -1) {
|
||||
if (ioctl(dev_fd(dev), BLKBSZGET, &dev->block_size) < 0) {
|
||||
log_sys_error("ioctl BLKBSZGET", name);
|
||||
return 0;
|
||||
|
@ -736,11 +736,11 @@ static void _init_alloc_parms(struct alloc_handle *ah, struct alloc_parms *alloc
|
||||
|
||||
/* Are there any preceding segments we must follow on from? */
|
||||
if (alloc_parms->prev_lvseg) {
|
||||
if ((alloc_parms->alloc == ALLOC_CONTIGUOUS))
|
||||
if (alloc_parms->alloc == ALLOC_CONTIGUOUS)
|
||||
alloc_parms->flags |= A_CONTIGUOUS;
|
||||
else if ((alloc_parms->alloc == ALLOC_CLING))
|
||||
else if (alloc_parms->alloc == ALLOC_CLING)
|
||||
alloc_parms->flags |= A_CLING;
|
||||
else if ((alloc_parms->alloc == ALLOC_CLING_BY_TAGS)) {
|
||||
else if (alloc_parms->alloc == ALLOC_CLING_BY_TAGS) {
|
||||
alloc_parms->flags |= A_CLING;
|
||||
alloc_parms->flags |= A_CLING_BY_TAGS;
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ int pv_resize(struct physical_volume *pv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((new_pe_count == old_pe_count)) {
|
||||
if (new_pe_count == old_pe_count) {
|
||||
pv->pe_count = old_pe_count;
|
||||
log_verbose("No change to size of physical volume %s.",
|
||||
pv_dev_name(pv));
|
||||
|
@ -329,13 +329,13 @@ static void _remove_from_bottomlevel(struct dm_tree_node *node)
|
||||
static int _link_tree_nodes(struct dm_tree_node *parent, struct dm_tree_node *child)
|
||||
{
|
||||
/* Don't link to root node if child already has a parent */
|
||||
if ((parent == &parent->dtree->root)) {
|
||||
if (parent == &parent->dtree->root) {
|
||||
if (dm_tree_node_num_children(child, 1))
|
||||
return 1;
|
||||
} else
|
||||
_remove_from_toplevel(child);
|
||||
|
||||
if ((child == &child->dtree->root)) {
|
||||
if (child == &child->dtree->root) {
|
||||
if (dm_tree_node_num_children(parent, 0))
|
||||
return 1;
|
||||
} else
|
||||
|
@ -121,7 +121,7 @@ static struct dm_list *_get_allocatable_pvs(struct cmd_context *cmd, int argc,
|
||||
}
|
||||
|
||||
/* Remove PV if full */
|
||||
if ((pvl->pv->pe_count == pvl->pv->pe_alloc_count))
|
||||
if (pvl->pv->pe_count == pvl->pv->pe_alloc_count)
|
||||
dm_list_del(&pvl->list);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
|
||||
/* Find segments to be moved and set up mirrors */
|
||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||
lv = lvl->lv;
|
||||
if ((lv == lv_mirr))
|
||||
if (lv == lv_mirr)
|
||||
continue;
|
||||
if (lv_name) {
|
||||
if (strcmp(lv->name, lv_name))
|
||||
|
@ -287,8 +287,8 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
|
||||
if (mirrored_seg->log_lv) {
|
||||
dm_list_iterate_items(seg, &mirrored_seg->log_lv->segments) {
|
||||
/* FIXME: The second test shouldn't be required */
|
||||
if ((seg->segtype ==
|
||||
get_segtype_from_string(vg->cmd, "error"))) {
|
||||
if (seg->segtype ==
|
||||
get_segtype_from_string(vg->cmd, "error")) {
|
||||
log_print("The log device for %s/%s has failed.",
|
||||
vg->name, mirrored_seg->lv->name);
|
||||
remove_log = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user