From a5a31ce94796c0061c36a0823725d16f250d9ab6 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 3 Oct 2011 18:29:48 +0000 Subject: [PATCH] Move priority check in front Just a minor code mode - make a test for priority before more complex uuid checks. --- libdm/libdm-deptree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index dcaa593dc..4c9eaad81 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1419,6 +1419,9 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, for (priority = 0; priority < 3; priority++) { while ((child = dm_tree_next_child(&handle, dnode, 0))) { + if (priority != child->activation_priority) + continue; + if (!(uuid = dm_tree_node_get_uuid(child))) { stack; continue; @@ -1427,9 +1430,6 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, if (!_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len)) continue; - if (priority != child->activation_priority) - continue; - if (!(name = dm_tree_node_get_name(child))) { stack; continue;