Merge branch 'jk/grep-binary-workaround-in-test'
[gitweb.git] / revision.c
index 82f3ca44b3e3dba8bdd487be04bd66b862fefa4c..8b2dfe3160784f9780cf541a674fe89100d38a93 100644 (file)
@@ -484,7 +484,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;