summaryrefslogtreecommitdiff
path: root/file/git-hist.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:10 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:40 -0300
commitce690a463d1905b2aba8a04c29a248af66153681 (patch)
tree96072589d04ca8b1c536c6a0b5c8f58c7c2a21b1 /file/git-hist.c
parent8dfb6b2c9f722d70b30e5794fe20ce9450dd05d4 (diff)
downloadeeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.gz
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.bz2
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.zip
eeshow/misc/util.h (realloc_size, realloc_type_n): get rid of bare "realloc"
Finally ! Shoulds have done this a long time ago.
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;
}