X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=reachable.c;h=a03fabf060081e9fa5e0d753cd0d9cf4bca5062e;hb=385cc9d8c44eb5be9d57e630129752a72c0a08c8;hp=3b1c18ff9b9060d0dd437ce89aedb8871c66c54c;hpb=92798702cf6d201f80e257a07d0a0c40565c79fe;p=git.git diff --git a/reachable.c b/reachable.c index 3b1c18ff9..a03fabf06 100644 --- a/reachable.c +++ b/reachable.c @@ -48,7 +48,6 @@ static void process_tree(struct tree *tree, obj->flags |= SEEN; if (parse_tree(tree) < 0) die("bad tree object %s", sha1_to_hex(obj->sha1)); - name = xstrdup(name); add_object(obj, p, path, name); me.up = path; me.elem = name; @@ -91,7 +90,7 @@ static void walk_commit_list(struct rev_info *revs) { int i; struct commit *commit; - struct object_array objects = { 0, 0, NULL }; + struct object_array objects = OBJECT_ARRAY_INIT; /* Walk all commits, process their trees */ while ((commit = get_revision(revs)) != NULL)