diff options
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/object_tree.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libcli/security/object_tree.c b/libcli/security/object_tree.c index fb523be4a5..3e5ee10951 100644 --- a/libcli/security/object_tree.c +++ b/libcli/security/object_tree.c @@ -97,11 +97,9 @@ struct object_tree *get_object_tree_by_GUID(struct object_tree *root, result = root; return result; } - else if (root->num_of_children > 0) { - for (i = 0; i < root->num_of_children; i++) { + for (i = 0; i < root->num_of_children; i++) { if ((result = get_object_tree_by_GUID(&root->children[i], guid))) break; - } } return result; } @@ -111,11 +109,9 @@ struct object_tree *get_object_tree_by_GUID(struct object_tree *root, void object_tree_modify_access(struct object_tree *root, uint32_t access_mask) { + int i; root->remaining_access &= ~access_mask; - if (root->num_of_children > 0) { - int i; - for (i = 0; i < root->num_of_children; i++) { - object_tree_modify_access(&root->children[i], access_mask); - } + for (i = 0; i < root->num_of_children; i++) { + object_tree_modify_access(&root->children[i], access_mask); } } |