fetch-pack: simplify add_sought_entry
[gitweb.git] / revision.c
index 14daefb174501950abdcecd89e49bb3856b9afbb..df56fcea0e12a11a35414fc5e1c14d1675436671 100644 (file)
@@ -540,7 +540,7 @@ struct treesame_state {
 static struct treesame_state *initialise_treesame(struct rev_info *revs, struct commit *commit)
 {
        unsigned n = commit_list_count(commit->parents);
-       struct treesame_state *st = xcalloc(1, sizeof(*st) + n);
+       struct treesame_state *st = xcalloc(1, st_add(sizeof(*st), n));
        st->nparents = n;
        add_decoration(&revs->treesame, &commit->object, st);
        return st;