From 908db0785f42561b2b53ef1bc8093b385e779fcf Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Wed, 9 Nov 2005 15:41:42 +0000 Subject: [PATCH] fix last checkin --- libdm/libdm-deptree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 5c7c93b4f..d828eb22b 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1053,8 +1053,8 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, continue; } - if (_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len)) - return 1; + if (!_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len)) + continue; if (dm_tree_node_num_children(child, 0)) dm_tree_activate_children(child, uuid_prefix, uuid_prefix_len); @@ -1579,7 +1579,7 @@ int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node, const char *log_uuid, unsigned area_count) { - struct dm_tree_node *log_node; + struct dm_tree_node *log_node = NULL; struct load_segment *seg; if (!node->props.segment_count) { @@ -1589,8 +1589,8 @@ int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node, seg = list_item(list_last(&node->props.segs), struct load_segment); - if (!(log_node = dm_tree_find_node_by_uuid(node->dtree, log_uuid))) { - log_error("Couldn't find snapshot log uuid %s.", log_uuid); + if (log_uuid && !(log_node = dm_tree_find_node_by_uuid(node->dtree, log_uuid))) { + log_error("Couldn't find mirror log uuid %s.", log_uuid); return 0; } -- 2.43.5