summaryrefslogtreecommitdiff
path: root/file/git-hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'file/git-hist.c')
-rw-r--r--file/git-hist.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/file/git-hist.c b/file/git-hist.c
index 308d76c..3e3c171 100644
--- a/file/git-hist.c
+++ b/file/git-hist.c
@@ -46,10 +46,8 @@ static struct hist *new_commit(unsigned branch)
static void uplink(struct hist *down, struct hist *up)
{
- down->newer = realloc(down->newer,
- sizeof(struct hist *) * (down->n_newer + 1));
- if (!down->newer)
- diag_pfatal("realloc");
+ down->newer = realloc_type_n(down->newer, struct hist *,
+ down->n_newer + 1);
down->newer[down->n_newer++] = up;
}