Initialize tree descriptors with a helper function rather than by hand.
[git/git.git] / reachable.c
index 01760d7..ff3dd34 100644 (file)
@@ -42,8 +42,7 @@ static void process_tree(struct tree *tree,
        me.elem = name;
        me.elem_len = strlen(name);
 
-       desc.buf = tree->buffer;
-       desc.size = tree->size;
+       init_tree_desc(&desc, tree->buffer, tree->size);
 
        while (tree_entry(&desc, &entry)) {
                if (S_ISDIR(entry.mode))